Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Logger sink with name browser skips browser:err #1950

Closed
arjunattam opened this issue Apr 23, 2020 · 3 comments
Closed

[BUG] Logger sink with name browser skips browser:err #1950

arjunattam opened this issue Apr 23, 2020 · 3 comments

Comments

@arjunattam
Copy link
Contributor

Context:

  • Playwright Version: 0.14.0
  • Operating System: Ubuntu 20.04

Code Snippet

I was expecting to see errors in launching the browser with this logger sink. However, this does not show logs in the browser:err namespace.

const { webkit } = require('playwright');

(async () => {
    const browser = await webkit.launch({ logger: {
        isEnabled: (name, severity) => name === 'browser',
        log: (name, severity, message, args) => console.log(`${name} ${message}`)
    }});
    await browser.close();
})();

Using this with DEBUG=* shows the errors.
Screen Shot 2020-04-23 at 2 00 05 PM

@pavelfeldman
Copy link
Member

That's kind of intended. Does name startsWith("browser") work for you?

@arjunattam
Copy link
Contributor Author

startsWith works for me. I thought the err was for severity and not the name, hence the confusion.

@pavelfeldman
Copy link
Member

Browser's stderr can be noisy, so we actually dispatch it as a warning severity :-)

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

No branches or pull requests

2 participants