Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

How can I use the same instance of pino in and out of express? #6

Closed
danjenkins opened this issue Jun 27, 2016 · 6 comments
Closed

Comments

@danjenkins
Copy link

Either its too early in my day or I can't see a way of say creating a pino instance and then using that within this library.

@mcollina
Copy link
Member

Currently there is not. The reason is that pino currently does not support injecting serializers in live instance or child loggers.

PR? :) Or we'll get it done asap!

@danjenkins
Copy link
Author

Ah that makes sense! Thanks @mcollina ! I need to get something out the door right now for a client but will attempt to come back to this tomorrow or wed :) unless you get there first :) Thanks for the quick reply.

@mcollina
Copy link
Member

See pinojs/pino#66

@jsumners
Copy link
Member

So the way I did it in hapi-pino wouldn't work for this module? hapijs/hapi-pino#8 (diff)

@mcollina
Copy link
Member

yes it will. It's a bit undocumented, and not API-compatible with Bunyan.
Anyway, I'm happy if you send in a similar PR!

@mcollina
Copy link
Member

Fixed in v1.1.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants