client-debug-log
v1.0.0
Published
Lightweight client debug logging server with multiple channels, including a web interface.
Maintainers
Readme
client-debug-log
Server-side logging package for the client-debug-log ecosystem.
It is intended to be used together with client-debug-log-client (npm), which acts as the client-side wrapper for sending logs to this server.
This lib is TypeScript-only and is intended to be used with typechecking.
Installation
npm install client-debug-logBasic Usage
import { LoggingServer, ConsoleChannel, WebChannel } from 'client-debug-log';
const server = new LoggingServer({
port: 3000,
channels: [
new ConsoleChannel(),
new WebChannel(),
],
});
const session = server.run();
await session.ready();run() starts the server and all configured channels.
ready() resolves once the configured channels are ready:
- immediately for
ConsoleChannel - after the first browser client connects for
WebChannel
Channels
ConsoleChannel
Writes incoming logs to the Node.js console.
Example output:
[2026-03-10T20:00:00.000Z] [info] User opened settingsWebChannel
Opens a browser window and shows incoming logs in a live web UI.
The web view includes:
- real-time log updates
- level-based filtering
- automatic scrolling while following new logs
Typical Setup
A common setup is:
client-debug-log-clientinside the client applicationclient-debug-loginside a local Node.js process- one or more channels depending on how you want to inspect logs
Development
npm run typecheck
npm run buildLicense
This project is licensed under the MIT License.
