Skip to content

Commit

Permalink
Fix transport docs (#1049)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Jul 4, 2021
1 parent 849f65a commit a8833f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -925,18 +925,17 @@ Multiple transports may also be defined, and specific levels can be logged to ea

```js
const pino = require('pino')
const transports = pino.transport([
{
const transports = pino.transport({
targets: [{
level: 'info',
target: 'some-transport',
options: { some: 'options for', the: 'transport' }
},
{
}, {
level: 'trace',
target: '#pino/file',
options: { destination: '/path/to/store/logs' }
}
])
}]
})
pino(transports)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/transports.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ sending all logs to `my-transport.mjs`? We can use the `pino.transport` function
```js
const pino = require('pino')
const transport = pino.transport({
destinations: [
targets: [
{ target: '/absolute/path/to/my-transport.mjs', level: 'error' },
{ target: 'some-file-transport', options: { destination: '/dev/null' }
]
Expand Down

0 comments on commit a8833f4

Please sign in to comment.