Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

egg-logger

Package Overview
Dependencies
Maintainers
12
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.4.2 to 2.5.0

9

History.md
2.5.0 / 2021-02-11
==================
**features**
* [[`81e2328`](http://github.com/eggjs/egg-logger/commit/81e2328a76fc26a4f9a1df0915127ad9e17600ec)] - feat: support console logger default level on env (#67) (lx <<lix059@gmail.com>>)
**others**
* [[`f987c06`](http://github.com/eggjs/egg-logger/commit/f987c0621b6b272ba9d56caa8af59b65c1251930)] - chore: github action (#63) (TZ | 天猪 <<atian25@qq.com>>)
2.4.2 / 2020-04-14

@@ -3,0 +12,0 @@ ==================

3

lib/egg/console_logger.js

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

/**
* @constructor
* @param {Object} options

@@ -30,3 +29,3 @@ * - {String} [encoding] - log string encoding, default is 'utf8'

encoding: 'utf8',
level: process.env.NODE_ENV === 'production' ? 'INFO' : 'WARN',
level: process.env.NODE_CONSOLE_LOGGRE_LEVEL || (process.env.NODE_ENV === 'production' ? 'INFO' : 'WARN'),
};

@@ -33,0 +32,0 @@ }

@@ -9,3 +9,3 @@ 'use strict';

/**
* @constructor
* @class
* @param {Context} ctx - egg Context instance

@@ -12,0 +12,0 @@ * @param {Logger} logger - Logger instance

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

/**
* @constructor
* @param {Object} options

@@ -19,0 +18,0 @@ * - {String} dir - log base dir

@@ -34,3 +34,3 @@ 'use strict';

/**
* @constructor
* @class
* @param {Object} config - egg app config

@@ -37,0 +37,0 @@ * - logger

@@ -26,5 +26,3 @@ 'use strict';

class Logger extends Map {
/**
* @constructor
* @param {Object} options - assign with `defaults` propery

@@ -31,0 +29,0 @@ */

@@ -15,3 +15,3 @@ 'use strict';

/**
* @constructor
* @class
* @param {Object} options

@@ -18,0 +18,0 @@ * - {Array} [stderrLevel = ERROR] - output to stderr level, must higher than options.level

@@ -14,3 +14,3 @@ 'use strict';

/**
* @constructor
* @class
* @param {Object} options

@@ -17,0 +17,0 @@ * - {String} file - log file path

@@ -19,3 +19,3 @@ 'use strict';

/**
* @constructor
* @class
* @param {Object} options

@@ -22,0 +22,0 @@ * - {String} file - file path

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

* Transport is an output channel of the log that can be output to a file, console or service.
* A {@link Logger} can configure multiple Transports to meet a variety of complex needs

@@ -18,3 +17,3 @@ */

/**
* @constructor
* @class
* @param {Object} options

@@ -21,0 +20,0 @@ * - {String} [level = NONE] - log level. ouput method must higher than this option. if level is `info`, `debug` will disabled

@@ -61,3 +61,3 @@ 'use strict';

* Invoke link: {@Link Logger#log} -> {@link Transport#log} -> LoggerUtils.format
* @method LoggerUtils#format
* @function LoggerUtils#format
* @param {String} level - log level

@@ -64,0 +64,0 @@ * @param {Array} args - format arguments

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

@@ -61,3 +61,4 @@ "main": "index.js",

"ci": {
"version": "6, 8, 10",
"version": "6, 8, 10, 12",
"type": "travis, github",
"license": true

@@ -64,0 +65,0 @@ },

@@ -120,4 +120,9 @@ # egg-logger

## Console logger level
set environment NODE_CONSOLE_LOGGRE_LEVEL = 'INFO' | 'WARN' | 'ERROR'
## License
[MIT](LICENSE)

@@ -119,4 +119,10 @@ # egg-logger

## console 默认打印级别设置
设置环境变量 NODE_CONSOLE_LOGGRE_LEVEL = 'INFO' | 'WARN' | 'ERROR'
## License
[MIT](LICENSE)
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