mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-06 03:16:17 +03:00
docs: fix logger API usage (#29961)
This commit is contained in:
parent
048d6669fd
commit
5d0c61fa0c
@ -10,7 +10,7 @@ const { chromium } = require('playwright'); // Or 'firefox' or 'webkit'.
|
|||||||
(async () => {
|
(async () => {
|
||||||
const browser = await chromium.launch({
|
const browser = await chromium.launch({
|
||||||
logger: {
|
logger: {
|
||||||
isEnabled: (name, severity) => name === 'browser',
|
isEnabled: (name, severity) => name === 'api',
|
||||||
log: (name, severity, message, args) => console.log(`${name} ${message}`)
|
log: (name, severity, message, args) => console.log(`${name} ${message}`)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
2
packages/playwright-core/types/types.d.ts
vendored
2
packages/playwright-core/types/types.d.ts
vendored
@ -18340,7 +18340,7 @@ export interface Keyboard {
|
|||||||
* (async () => {
|
* (async () => {
|
||||||
* const browser = await chromium.launch({
|
* const browser = await chromium.launch({
|
||||||
* logger: {
|
* logger: {
|
||||||
* isEnabled: (name, severity) => name === 'browser',
|
* isEnabled: (name, severity) => name === 'api',
|
||||||
* log: (name, severity, message, args) => console.log(`${name} ${message}`)
|
* log: (name, severity, message, args) => console.log(`${name} ${message}`)
|
||||||
* }
|
* }
|
||||||
* });
|
* });
|
||||||
|
Loading…
Reference in New Issue
Block a user