We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello. I'm trying to configure pino as follows:
However, it seems that enabling pino-sentry-transport disables the STDOUT logging.
How can one configure so that both work?
Note: this is in a production setting (inside a Docker container), so I'd rather not use pino-pretty for STDOUT
I think the approach would be to have some sort of "stdout transport", but I don't know how to configure this together with the pino-sentry-transport.
The text was updated successfully, but these errors were encountered:
The solution is to use pino/file, with destination set to 1:
pino/file
destination
Example below is based on Fastify, sending logs to both stdout & Sentry (for error and above)
Fastify
const transportTargets: TransportTargetOptions[] = [ { target: 'pino/file', options: { destination: 1 }, level: 'info' }, { target: 'pino-sentry-transport', options: { sentry: { dsn: 'https://some/sentry/url' }, minLevel: 40 }, level: 'info' } ] const logger = { level: config.logLevel, transport: { targets: transportTargets } } // Pass this logger to the fastify instance const server: FastifyInstance = Fastify({logger: logger}) // continue with Fastify setup.
Sorry, something went wrong.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
No branches or pull requests
Hello. I'm trying to configure pino as follows:
However, it seems that enabling pino-sentry-transport disables the STDOUT logging.
How can one configure so that both work?
Note: this is in a production setting (inside a Docker container), so I'd rather not use pino-pretty for STDOUT
I think the approach would be to have some sort of "stdout transport", but I don't know how to configure this together with the pino-sentry-transport.
The text was updated successfully, but these errors were encountered: