Logger
Playwright generates a lot of logs and they are accessible via the pluggable logger sink.
const { chromium } = require('playwright'); // Or 'firefox' or 'webkit'.
(async () => { const browser = await chromium.launch({ logger: { isEnabled: (name, severity) => name === 'browser', log: (name, severity, message, args) => console.log(`${name} ${message}`) } }); ...})();
#
logger.isEnabled(name, severity)Determines whether sink is interested in the logger with the given name and severity.