question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configure Pino.js to work with pm2

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
amitgilad3commented, Apr 29, 2021

Thanks @favoyang for the info, i already have a fix in place.

0reactions
stale[bot]commented, Apr 29, 2022

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! 💘

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found