mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
5.0 KiB
5.0 KiB
id | title |
---|---|
class-logger | 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.