I want console logging channels
Submitted by Andreas Linnert
Permalink https://webwewant.fyi/wants/fa6ff049-7a39-4a02-82e4-f37cf50449b9/
This idea is currently being discussed.
I want a console.channel() API that lets developers create named, isolated logging channels in the browser console.
Today every script in a page shares a single console output stream, which quickly becomes an unmanageable wall of text in large or complex applications. There is no native way to separate the logs produced by, say, a state-management library from those produced by a routing layer or a third-party analytics SDK.
I propose a named-channel API along these lines:
const channel = console.channel('my-feature');
channel.log('Hello from my-feature');
channel.warn('Something looks off');
channel.error('Something went wrong');Browser DevTools would display a filterable list of all registered channels alongside the standard "All messages" view. Selecting a channel would show only its output, making it trivial to focus on the logs that matter right now.
This would benefit every layer of the web development stack:
- Library authors could emit detailed diagnostic output — outgoing requests, response payloads, internal state transitions — without polluting users' consoles.
- Application developers could partition logs by feature area, domain layer, or team ownership and share a direct channel filter link when filing bugs.
- Debugging sessions would be faster and less frustrating: instead of grepping through thousands of mixed log lines, developers could zero in on the exact channel relevant to the problem they are investigating.
The pattern is already proven in other environments: Node.js offers util.debuglog(), and logging frameworks like debug for Node/browsers work around the same limitation with monkey-patching. A first-class browser API would make this capability universally available, consistent, and inspectable in DevTools without any third-party dependency.
- Votes
- 0
What are votes for and how are they tallied?