Comparing version 4.7.2 to 4.7.3
@@ -21,5 +21,6 @@ 'use strict' | ||
} | ||
if (opts.enabled === false) opts.level = 'silent' | ||
var level = opts.level || 'info' | ||
var val = pino.levels.values[level] | ||
if (level === 'silent') val = Infinity | ||
var logger = Object.create(proto) | ||
@@ -26,0 +27,0 @@ if (!logger.log) logger.log = noop |
@@ -37,2 +37,3 @@ # Transports | ||
+ [pino-mq](#pino-mq) | ||
+ [pino-redis](#pino-redis) | ||
+ [pino-socket](#pino-socket) | ||
@@ -80,2 +81,7 @@ + [pino-syslog](#pino-syslog) | ||
If you wish to connect to AWS Elasticsearch: | ||
```sh | ||
$ node yourapp.js | pino-elasticsearch --host https://your-url.us-east-1.es.amazonaws.com --port 443 -c ./aws_config.json | ||
``` | ||
Then, head to your | ||
@@ -112,2 +118,14 @@ Kibana instance, and [create an index pattern](https://www.elastic.co/guide/en/kibana/current/setup.html) on `'pino'`, | ||
<a id="pino-redis"></a> | ||
### pino-redis | ||
[pino-redis][pino-redis] loads pino logs into [Redis][Redis]. | ||
```sh | ||
$ node yourapp.js | pino-redis -U redis://username:password@localhost:6379 | ||
``` | ||
[pino-redis]: https://github.com/buianhthang/pino-redis | ||
[Redis]: https://redis.io/ | ||
<a id="pino-socket"></a> | ||
@@ -114,0 +132,0 @@ ### pino-socket |
{ | ||
"name": "pino", | ||
"version": "4.7.2", | ||
"version": "4.7.3", | ||
"description": "super fast, all natural json logger", | ||
@@ -5,0 +5,0 @@ "main": "pino.js", |
@@ -334,3 +334,3 @@ ![banner](pino-banner.png) | ||
You'll find an active group of Pino users in the #pino channel on Freenode, including some of the contributors to this project. | ||
You'll find an active group of Pino users in the #pinojs channel on Freenode, including some of the contributors to this project. | ||
@@ -337,0 +337,0 @@ ## Contributing |
@@ -13,2 +13,36 @@ 'use strict' | ||
test('silent level', function (t) { | ||
var instance = pino({ | ||
level: 'silent', | ||
browser: {write: function (o) { | ||
t.fail() | ||
}} | ||
}) | ||
instance.info('test') | ||
var child = instance.child({test: 'test'}) | ||
child.info('msg-test') | ||
// use setTimeout because setImmediate isn't supported in most browsers | ||
setTimeout(function () { | ||
t.pass() | ||
t.end() | ||
}, 0) | ||
}) | ||
test('enabled false', function (t) { | ||
var instance = pino({ | ||
enabled: false, | ||
browser: {write: function (o) { | ||
t.fail() | ||
}} | ||
}) | ||
instance.info('test') | ||
var child = instance.child({test: 'test'}) | ||
child.info('msg-test') | ||
// use setTimeout because setImmediate isn't supported in most browsers | ||
setTimeout(function () { | ||
t.pass() | ||
t.end() | ||
}, 0) | ||
}) | ||
test('throw if creating child without bindings', function (t) { | ||
@@ -15,0 +49,0 @@ t.plan(1) |
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
142515
3315