nodejs / nodejs/undici

Move debuglog out of diagnostic channels

Open
#3,809 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
7.7k
Forks
880
Avg merge
2d 16h
Merged PRs (30d)
68

Description

Unfortunately, using diagnostic channels to set up debuglog was a bad idea. It won't work because our implementation inside Node.js will react to the same NODE_DEBUG flag, and duplicate the messages, making these logs hard to read.

A solution for this would be:

  1. detect if we are running in Node.js core, and if so, use a different debuglog prefix
  2. move away from using diagnostics channels and just inline the debuglogs

Do you see any other options?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the debuglog integration through diagnostic channels and the Node.js NODE_DEBUG handling. Compare the proposed core-specific prefix and inline-debuglog approaches, then define the selected change and verify that duplicate messages no longer appear.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.