-
Notifications
You must be signed in to change notification settings - Fork 885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add transports constructor option #1111
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work! I think it should throw if stream is otherwise defined.
Co-authored-by: Matteo Collina <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Co-authored-by: James Sumners <[email protected]>
The `transport` option is a shortcut to the [pino.transport()](#pino-transport) function. | ||
It supports the same input options: | ||
```js | ||
require('pino')({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we do this require('pino') inline thing elsewhere in the docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are 18 occurrences of require('pino')
in this file actually: would you like to migrate the examples to pino
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do they assign the result of require
or do they use it directly like this example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both declaration tbh
I can update this example and the other ones if you tell me what do you prefer.
Is the cjs syntax not up to date for users?
Co-authored-by: David Mark Clements <[email protected]>
Co-authored-by: James Sumners <[email protected]>
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Implements #1105
Opening as a draft to ask what do you prefer if:
transports
field name to manage bothpino.transport()
input? ({target}
or{targets:[]}
)Then I'm going to add more tests and doc as well