Comparing version 3.1.0 to 3.1.1
# Table of Contents | ||
+ [Constructor](#constructor) | ||
* [.pretty](#pretty) | ||
+ [Logger](#logger) | ||
@@ -24,3 +25,2 @@ * [.child](#child) | ||
+ [.err](#errSerializer) | ||
* [.pretty](#pretty) | ||
@@ -78,2 +78,31 @@ # module.exports | ||
<a id="pretty"></a> | ||
## .pretty([options]) | ||
### Parameters: | ||
+ `options` (object): | ||
* `timeTransOnly` (boolean): if set to `true`, it will only covert the unix | ||
timestamp to ISO 8601 date format, and reserialize the JSON (equivalent to `pino -t`). | ||
* `formatter` (function): a custom function to format the line, is passed the | ||
JSON object as an argument and should return a string value. | ||
### Example: | ||
```js | ||
'use strict' | ||
var pino = require('pino') | ||
var pretty = pino.pretty() | ||
pretty.pipe(process.stdout) | ||
var log = pino({ | ||
name: 'app', | ||
safe: true | ||
}, pretty) | ||
log.child({ widget: 'foo' }).info('hello') | ||
log.child({ widget: 'bar' }).warn('hello 2') | ||
``` | ||
### Discussion: | ||
Provides access to the [CLI](cli.md) log prettifier as an API. | ||
<a id="logger"></a> | ||
@@ -481,30 +510,1 @@ # Logger | ||
``` | ||
<a id="pretty"></a> | ||
## .pretty([options]) | ||
### Parameters: | ||
+ `options` (object): | ||
* `timeTransOnly` (boolean): if set to `true`, it will only covert the unix | ||
timestamp to ISO 8601 date format, and reserialize the JSON (equivalent to `pino -t`). | ||
* `formatter` (function): a custom function to format the line, is passed the | ||
JSON object as an argument and should return a string value. | ||
### Example: | ||
```js | ||
'use strict' | ||
var pino = require('pino') | ||
var pretty = pino.pretty() | ||
pretty.pipe(process.stdout) | ||
var log = pino({ | ||
name: 'app', | ||
safe: true | ||
}, pretty) | ||
log.child({ widget: 'foo' }).info('hello') | ||
log.child({ widget: 'bar' }).warn('hello 2') | ||
``` | ||
### Discussion: | ||
Provides access to the [CLI](cli.md) log prettifier as an API. |
{ | ||
"name": "pino", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "super fast, all natural json logger", | ||
@@ -47,3 +47,4 @@ "main": "pino.js", | ||
"David Mark Clements <huperekchuno@googlemail.com>", | ||
"James Sumners <james.sumners@gmail.com>" | ||
"James Sumners <james.sumners@gmail.com>", | ||
"Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)" | ||
], | ||
@@ -69,3 +70,3 @@ "license": "MIT", | ||
"steed": "^1.1.3", | ||
"tap": "^8.0.0", | ||
"tap": "^9.0.0", | ||
"tape": "^4.6.2", | ||
@@ -72,0 +73,0 @@ "through2": "^2.0.1", |
@@ -30,2 +30,10 @@ ![banner](pino-banner.png) | ||
If you need support for Node.js v0.12 or v0.10, please install the latest 2.x release using the `legacy` tag: | ||
``` | ||
npm install pino@legacy --save | ||
``` | ||
Documentation for the legacy version 2.x is available on the [`v2.x.x` branch](https://github.com/pinojs/pino/tree/v2.x.x). | ||
## Usage | ||
@@ -220,2 +228,10 @@ | ||
### Thomas Watson Steen | ||
<https://github.com/watson> | ||
<https://www.npmjs.com/~watson> | ||
<https://twitter.com/wa7son> | ||
### Chat on Gitter | ||
@@ -222,0 +238,0 @@ |
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
101224
260