Skip to content
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

More control over logging #162

Closed
2 tasks
temsa opened this issue Mar 19, 2019 · 4 comments
Closed
2 tasks

More control over logging #162

temsa opened this issue Mar 19, 2019 · 4 comments
Labels
good first issue Good for newcomers

Comments

@temsa
Copy link

temsa commented Mar 19, 2019

@mcollina It seems that we currently need to eject if we want more control over the logger, e.g.:

  • force the pino logger instance so we can use the logger out of fastify context
  • set our own configuration, notably what to redact or serializers

It could be great if that would not be necessary ( an env var for loading a module exporting the logger could be enough, and some example in the Readme )

@mcollina mcollina added the good first issue Good for newcomers label Mar 25, 2019
@mcollina
Copy link
Member

I think having this would be amazing. I've tagged it as "good first contribution", if there is somebody that would be willing to work on it sooner than what we could provide.

@francisbrito
Copy link
Contributor

Is it ok if I have a look at this one?

@temsa @mcollina would something along the lines of FASTIFY_LOGGING_MODULE=<path_to_logging_module_file.js> work?

Should the module export an object confirming the "Pino Interface", a function returning a Pino-interface-compatible object or any of the two?

@mcollina
Copy link
Member

mcollina commented Oct 4, 2019

Should the module export an object confirming the "Pino Interface", a function returning a Pino-interface-compatible object or any of the two?

How about the whole logger configuration for the fastify instance? That seems flexible enough.

@francisbrito
Copy link
Contributor

Sounds good, I'll proceed to open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants