Configure Pino.js to work with pm2
See original GitHub issueDescribe the bug
Pino.js has an issue with pm2 if you manually set the destination to descriptor 1. Because pm2 overwrites process.stdout.write
with its own function. see https://github.com/pinojs/pino/issues/491#issuecomment-414075492
Pino fixed this issue in https://github.com/pinojs/pino/pull/493/files if you don’t specify the destination when writing to stdout.
https://github.com/pinojs/pino/issues/491
To Reproduce
See this comment, https://github.com/pinojs/pino/issues/491#issuecomment-414043388
Expected behavior
Let pino.js handle the magic by removing the destination.
const logger = pino(pinoConfig, destination);
=>
const logger = pino(pinoConfig);
Configuration File (cat ~/.config/verdaccio/config.yaml)
logs: { type: stdout, format: pretty, level: http }
Environment information
verdaccio: 5.x
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Configure Pino.js to work with pm2 - Bountysource
Describe the bug. Pino.js has an issue with pm2 if you manually set the destination to descriptor 1. Because pm2 overwrites ...
Read more >A Complete Guide to Pino Logging in Node.js - Better Stack
In this tutorial, you will learn how to create a logging service for your application with Pino. We'll discuss many of the features...
Read more >Pino Transporter and PM2 - node.js - Stack Overflow
I want to use pino-mysql in my Node.js project. How they suggest to use this transporter is using shell piping like:
Read more >Logs - PM2
Advanced process manager for production Node.js applications. Load balancer, logs facility, startup script, micro service management, ...
Read more >Comparing Node.js logging tools - LogRocket Blog
Learn about different Node.js logging libraries like Bunyan, Pino, npmlog, ... Over 200k developers use LogRocket to create better digital ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @favoyang for the info, i already have a fix in place.
Hi pal 👋🏼! This issue has gone quiet 😶.
We get a lot of issues, so we currently close issues after 180 days of inactivity. It’s been at least 90c days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add/suggest the label “discuss” to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out https://github.com/verdaccio/contributing for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Verdaccio community! 💘