Skip to content

Don't pollute the console#15

Open
regseb wants to merge 1 commit intolightpanda-io:mainfrom
regseb:console
Open

Don't pollute the console#15
regseb wants to merge 1 commit intolightpanda-io:mainfrom
regseb:console

Conversation

@regseb
Copy link
Copy Markdown
Contributor

@regseb regseb commented Mar 28, 2026

The serve method writes to the console. This can cause problems if the program, which uses Lightpanda, writes JSON (or another structured data format) to the console.


If the user wants to log the PID, they can do so:

const process = await serve();
console.info("🐼 Running Lightpanda's CDP server…", {
    pid: process.pid,
});

Or if he wants to use a different logger:

import pino from "pino";
const logger = pino({});

const process = await serve()
logger.info({ pid: process.pid }, "🐼 Running Lightpanda's CDP server…", );

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 28, 2026

⚠️ No Changeset found

Latest commit: 553e883

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant