Comparing version 2.5.0 to 2.6.0
@@ -21,1 +21,10 @@ 'use strict' | ||
childsChild.info('hello baby..') | ||
pino.debug('this should be mute') | ||
pino.level = 'trace' | ||
pino.debug('this is a debug statement') | ||
pino.child({ another: 'property' }).debug('this is a debug statement via child') | ||
pino.trace('this is a trace statement') |
{ | ||
"name": "pino", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "fast and simple logger", | ||
@@ -13,3 +13,4 @@ "main": "pino.js", | ||
"scripts": { | ||
"test": "standard && tap test.js" | ||
"test": "standard && tap --no-cov test/*test.js", | ||
"ci": "standard && tap --cov test/*test.js" | ||
}, | ||
@@ -16,0 +17,0 @@ "precommit": "test", |
15
pino.js
@@ -214,3 +214,3 @@ 'use strict' | ||
value = bindings[key] | ||
if (bindings.hasOwnProperty(key) && value !== undefined) { | ||
if (key !== 'level' && bindings.hasOwnProperty(key) && value !== undefined) { | ||
value = this.serializers[key] ? this.serializers[key](value) : value | ||
@@ -222,3 +222,14 @@ data += '"' + key + '":' + this.stringify(value) + ',' | ||
return new Pino(this.level, this.stream, this.serializers, this.stringify, this.end, this.name, this.hostname, this.slowtime, data, this.cache, this.formatOpts) | ||
return new Pino( | ||
bindings.level || this.level, | ||
this.stream, | ||
this.serializers, | ||
this.stringify, | ||
this.end, | ||
this.name, | ||
this.hostname, | ||
this.slowtime, | ||
data, | ||
this.cache, | ||
this.formatOpts) | ||
} | ||
@@ -225,0 +236,0 @@ |
@@ -1,2 +0,2 @@ | ||
# pino [![Build Status](https://travis-ci.org/mcollina/pino.svg)](https://travis-ci.org/mcollina/pino) | ||
# pino [![Build Status](https://travis-ci.org/mcollina/pino.svg)](https://travis-ci.org/mcollina/pino) [![Coverage Status](https://coveralls.io/repos/github/mcollina/pino/badge.svg?branch=master)](https://coveralls.io/github/mcollina/pino?branch=master) | ||
@@ -233,2 +233,4 @@ [Extremely fast](#benchmarks) node.js logger, inspired by Bunyan. | ||
v1.x.x it was immutable), and can be set independently of the parent. | ||
If a `level` property is present in the object passed to `child` it will | ||
override the child logger level. | ||
@@ -246,2 +248,3 @@ For example | ||
logger.info('nope nope nope') //will not log, level is still set to error | ||
logger.child({ foo: 'bar', level: 'debug' }).debug('debug!') | ||
``` | ||
@@ -809,2 +812,6 @@ | ||
### Chat on Gitter | ||
<https://gitter.im/mcollina/pino> | ||
<a name="acknowledgements"></a> | ||
@@ -817,2 +824,2 @@ ## Acknowledgements | ||
MIT | ||
Licensed under [MIT](./LICENSE). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
480655
25
1972
822