Skip to content

Commit

Permalink
fix(docs/transports): #pino/file has been renamed to pino/file (#1159)
Browse files Browse the repository at this point in the history
  • Loading branch information
pan93412 committed Oct 15, 2021
1 parent fc291b7 commit bee6233
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/transports.md
Expand Up @@ -212,15 +212,15 @@ The `options.destination` property may be set to specify the desired file destin
```js
const pino = require('pino')
const transport = pino.transport({
target: '#pino/file',
target: 'pino/file',
options: { destination: '/path/to/file' }
})
pino(transport)
```
The `options.destination` property may also be a number to represent a file descriptor. Typically this would be `1` to write to STDOUT or `2` to write to STDERR. If `options.destination` is not set, it defaults to `1` which means logs will be written to STDOUT.
The difference between using the `#pino/file` transport builtin and using `pino.destination` is that `pino.destination` runs in the main thread, whereas `#pino/file` sets up `pino.destination` in a worker thread.
The difference between using the `pino/file` transport builtin and using `pino.destination` is that `pino.destination` runs in the main thread, whereas `pino/file` sets up `pino.destination` in a worker thread.
#### `pino-pretty`
Expand Down

0 comments on commit bee6233

Please sign in to comment.