Socket
Socket
Sign inDemoInstall

egg-logger

Package Overview
Dependencies
Maintainers
13
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-logger - npm Package Compare versions

Comparing version 2.5.0 to 2.6.0

10

History.md
2.6.0 / 2021-03-23
==================
**features**
* [[`d414828`](http://github.com/eggjs/egg-logger/commit/d414828d6e511c2be6be7586380ecb917281c238)] - feat: logger formatError should support FrameworkErrorFormater (#70) (mansonchor.github.com <<mansonchor@126.com>>)
**others**
* [[`33e1e74`](http://github.com/eggjs/egg-logger/commit/33e1e743d932a1897a2588ba5d4c64f05ce9d437)] - refactor: new Buffer() API refactor (#69) (mansonchor.github.com <<mansonchor@126.com>>)
* [[`5303d31`](http://github.com/eggjs/egg-logger/commit/5303d31bc1512e85561e000836143bc7daae20d9)] - test: only run tests on github actions (#68) (fengmk2 <<fengmk2@gmail.com>>)
2.5.0 / 2021-02-11

@@ -3,0 +13,0 @@ ==================

9

lib/utils.js

@@ -10,2 +10,3 @@ 'use strict';

const circularJSON = require('circular-json-for-egg');
const { FrameworkBaseError, FrameworkErrorFormater } = require('egg-errors');

@@ -78,3 +79,3 @@ const hostname = os.hostname();

* - {Function} formatter
* @return {Buffer} formatted log string buffer
* @return {String|Buffer} formatted log string buffer
*/

@@ -107,3 +108,3 @@ format(level, args, meta, options) {

if (!output) return new Buffer('');
if (!output) return Buffer.from('');

@@ -140,2 +141,6 @@ output += options.eol;

function formatError(err) {
if (err instanceof FrameworkBaseError) {
return FrameworkErrorFormater.format(err);
}
if (err.name === 'Error' && typeof err.code === 'string') {

@@ -142,0 +147,0 @@ err.name = err.code + err.name;

{
"name": "egg-logger",
"version": "2.5.0",
"version": "2.6.0",
"description": "egg logger",

@@ -11,2 +11,3 @@ "main": "index.js",

"depd": "^2.0.0",
"egg-errors": "^2.2.0",
"iconv-lite": "^0.4.24",

@@ -23,6 +24,5 @@ "mkdirp": "^0.5.1",

"egg-bin": "^4.9.0",
"egg-ci": "^1.11.0",
"egg-ci": "^1.18.0",
"eslint": "^5.11.1",
"eslint-config-egg": "^7.1.0",
"heapdump": "^0.3.12",
"ko-sleep": "^1.0.3",

@@ -63,4 +63,7 @@ "koa": "^1.6.2",

"ci": {
"version": "6, 8, 10, 12",
"type": "travis, github",
"version": "8, 10, 12, 14",
"type": "github",
"os": {
"github": "linux, macos"
},
"license": true

@@ -67,0 +70,0 @@ },

# egg-logger
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![build status][github-action-image]][github-action-url]
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]

@@ -12,8 +11,6 @@ [![npm download][download-image]][download-url]

[npm-url]: https://npmjs.org/package/egg-logger
[travis-image]: https://img.shields.io/travis/eggjs/egg-logger.svg?style=flat-square
[travis-url]: https://travis-ci.org/eggjs/egg-logger
[github-action-image]: https://github.com/eggjs/egg-logger/workflows/Node.js%20CI/badge.svg
[github-action-url]: https://github.com/eggjs/egg-logger/actions
[codecov-image]: https://codecov.io/github/eggjs/egg-logger/coverage.svg?branch=master
[codecov-url]: https://codecov.io/github/eggjs/egg-logger?branch=master
[david-image]: https://img.shields.io/david/eggjs/egg-logger.svg?style=flat-square
[david-url]: https://david-dm.org/eggjs/egg-logger
[snyk-image]: https://snyk.io/test/npm/egg-logger/badge.svg?style=flat-square

@@ -20,0 +17,0 @@ [snyk-url]: https://snyk.io/test/npm/egg-logger

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc