What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Set the pyppeteer logger to a threshold such as logging.CRITICAL before creating or connecting to a browser. You can also pass logLevel directly to launch() or connect(). If Chromium still writes to the terminal, check the separate dumpio option.

Use the Pyppeteer logger before launching

Pyppeteer writes its package messages through Python’s pyppeteer logger. Configure that logger before calling launch() or connect(); setting it afterward may leave startup messages already emitted.

import asyncio
import logging
from pyppeteer import launch

# Show only the most severe Pyppeteer records.
logging.getLogger("pyppeteer").setLevel(logging.CRITICAL)

async def main():
    browser = await launch()
    page = await browser.newPage()
    await page.goto("https://example.com")
    print(await page.title())
    await browser.close()

asyncio.run(main())

This changes only the package logger. Your application’s own logger and unrelated libraries keep their existing configuration, which is usually safer than disabling Python logging globally.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose how much output to retain

A logging level is a threshold: records below it are filtered out, while records at that severity or higher remain available.

Level What remains When to use it
logging.CRITICAL Only critical records Quiet production output when ordinary warnings and errors are not wanted
logging.ERROR Errors and critical records Keep failure messages while hiding warnings, information, and debug output
logging.WARNING Warnings, errors, and critical records A practical production default when diagnostics still matter
logging.DEBUG Verbose diagnostic records Temporary troubleshooting; Pyppeteer’s documentation specifically recommends this for debugging

Use the least restrictive level that still answers your operational questions. CRITICAL is the closest choice to “silence Pyppeteer,” but it also removes useful warnings and errors from normal logs.

Set the level for one browser call

The launcher API accepts a logLevel option as either an integer logging constant or a string. This keeps the choice next to the browser operation rather than changing the package logger for the rest of the process.

import asyncio
import logging
from pyppeteer import launch

async def main():
    browser = await launch(logLevel=logging.CRITICAL)
    await browser.close()

asyncio.run(main())

You can use a string level when that fits your configuration style:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
browser = await launch(logLevel="ERROR")

The documented default is inherited from the root logger. If your application configures the root logger centrally, an omitted logLevel can therefore produce more or less output than you expect.

Apply the same setting when connecting to an existing browser

connect() exposes the same option. Set it on the connection call when Pyppeteer attaches to a browser started elsewhere.

import asyncio
import logging
from pyppeteer import connect

async def main():
    browser = await connect(
        browserWSEndpoint="ws://127.0.0.1:9222/devtools/browser/your-id",
        logLevel=logging.ERROR,
    )
    await browser.close()

asyncio.run(main())

Replace the endpoint with the WebSocket endpoint supplied by your Chromium process. The logging threshold affects Pyppeteer’s records generated while that connection is created and used.

Why NOTSET does not reliably silence Pyppeteer

logging.NOTSET means “no threshold at this logger.” Python then consults ancestor logger configuration. If the root logger or another ancestor allows informational or debug records, Pyppeteer can continue to emit them. For predictable suppression, use a concrete threshold such as CRITICAL; for retained diagnostics, use ERROR or WARNING.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Similarly, logging.disable(...) and root-logger changes affect every library in the process. They can hide messages your application still needs, so prefer the package-specific logger unless you intentionally want a process-wide policy.

“Or skip the browser setup”

If your goal is simply to obtain a clean website screenshot rather than control a Pyppeteer process, ScreenshotNeo provides a website screenshot API and MCP server. A single request returns PNG, JPEG, WebP, or PDF output; its logging configuration is unrelated to Pyppeteer because no local browser setup is required.

Using the documented API (see the ScreenshotNeo documentation):

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
  • Cookie and consent banners, newsletter popups, and chat widgets are removed before the shot.
  • Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers identify the page verdict and whether it was billed.
  • An MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.
  • The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Every feature is included on every plan.

Create a free ScreenshotNeo account to try the 1,000-shot allowance without adding a card.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When changing the logger does not stop terminal output

Check dumpio

dumpio is independent of Python’s pyppeteer logger. The launch option controls whether Chromium’s own standard output and standard error are piped into the parent process. If you enabled it, Chromium can continue printing even after the package logger is set to CRITICAL.

import asyncio
import logging
from pyppeteer import launch

async def main():
    browser = await launch(
        logLevel=logging.CRITICAL,
        dumpio=False,
    )
    await browser.close()

asyncio.run(main())

Remove an explicit dumpio=True or set it to False when you do not want Chromium’s process streams copied to your terminal. This does not replace logger configuration; it addresses a different output source.

Set the level before browser creation

Place logging.getLogger("pyppeteer").setLevel(...) near application startup, before launch() or connect(). A per-call logLevel is useful when a shared process runs multiple browser operations with different verbosity requirements.

Identify which stream is producing the line

  • Messages emitted as Python logging records are controlled by the pyppeteer logger and its logLevel setting.
  • Raw Chromium text appearing because process streams are being piped is controlled by dumpio.
  • Your own handlers or root-logger configuration can still determine where retained records are displayed.

Temporarily use logging.DEBUG while diagnosing a failure, then return to WARNING, ERROR, or CRITICAL after the cause is understood.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Scope, severity, lifecycle, and source compared

Approach Scope Retained severity Lifecycle Output source
getLogger("pyppeteer").setLevel(...) Pyppeteer package logger Chosen threshold Process-level until changed Pyppeteer logging records
launch(logLevel=...) The launch configuration Chosen threshold One launch call’s configuration Pyppeteer logging records
connect(logLevel=...) The connection configuration Chosen threshold One connection call’s configuration Pyppeteer logging records
dumpio=False Chromium process streams Suppresses piping of stdout/stderr Browser launch setting Chromium stdout and stderr
Root logger or logging.disable(...) Application-wide Can affect every library Global logging configuration All affected Python loggers

Production patterns

Quiet production service

import logging

logging.getLogger("pyppeteer").setLevel(logging.ERROR)

This keeps errors and critical records for incident review while removing routine warnings, information, and debug messages.

Diagnostics without changing application logging

import logging

pyppeteer_logger = logging.getLogger("pyppeteer")
pyppeteer_logger.setLevel(logging.DEBUG)

Use this temporarily when investigating browser startup, navigation, or connection behavior. Restore the previous threshold after collecting the needed information.

Per-operation verbosity

quiet_browser = await launch(logLevel=logging.CRITICAL)
diagnostic_browser = await launch(logLevel=logging.DEBUG)

This pattern is useful when a long-running process has one normal workload and a separate diagnostic operation. Close each browser when its work is complete.

Troubleshooting checklist

Debug lines still appear

  • Confirm that the logger name is exactly pyppeteer, not a similarly named application logger.
  • Move the configuration above the first launch() or connect() call.
  • Check whether the root logger is supplying a level because your package logger is still NOTSET.
  • Look for dumpio=True; those lines may be Chromium process output rather than Pyppeteer records.

Errors disappeared along with noise

You probably selected CRITICAL. Change to ERROR to retain error records, or WARNING to retain warnings as well.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Only Chromium output remains

Set dumpio=False or remove the option. Logger thresholds cannot filter text that is being copied directly from Chromium’s stdout or stderr.

The setting has no effect on a connected browser

Pass logLevel to connect() or configure the pyppeteer logger before connecting. Do not assume that a setting applied to a different process controls the process that owns the existing browser.

You need to investigate a failure

Temporarily select logging.DEBUG on the relevant launch or connection, reproduce the problem, and then lower the threshold. Debug output is intentionally much more verbose than production output.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Maintenance note for new projects

Pyppeteer’s current repository describes the project as an unofficial Python port of Puppeteer and states that it is unmaintained. It points readers toward Playwright Python for new work. The logger and logLevel techniques above remain useful when maintaining existing Pyppeteer code, but a new automation project should evaluate the actively recommended alternative before committing to Pyppeteer.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

FAQ

Does disabling Pyppeteer logging disable Python exceptions?

No. A logger threshold controls emitted log records; it does not prevent an exception from being raised by your code or by an awaited browser operation. Handle exceptions separately and keep the level high enough to preserve the operational records you need.

Should I use CRITICAL in every deployment?

No. It is appropriate when routine diagnostics must be quiet, but ERROR or WARNING usually leaves more information for diagnosing failed navigation or startup without enabling full debug output.

When is a global logging change justified?

Only when the entire process is intended to follow one logging policy. If your application and other dependencies still need their messages, configure the pyppeteer logger or the individual browser call instead.

Frequently Asked Questions

Does disabling Pyppeteer logging disable Python exceptions?

No. A logger threshold filters log records; it does not stop exceptions raised by your code or an awaited browser operation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Should every deployment use logging.CRITICAL?

No. Use CRITICAL for maximum quiet, ERROR to retain failures, or WARNING when warnings are operationally useful.

When is a global logging change justified?

Only when the whole process should share one policy; otherwise configure Pyppeteer’s logger or the specific browser call.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.