[Bug] not getting all DEBUG=pw:api calls into the Logger
See original GitHub issueI am sometimes using the awesome DEBUG=pw:api
to see what happens during a failure (in combination with the awesome video recording and/or inspector). All great tools.
But I would want to run my tests in CI and get the logs shown by DEBUG=pw:api
into the Logger. Something like:
const { chromium } = require('playwright'); // Or 'firefox' or 'webkit'.
(async () => {
const browser = await chromium.launch({
debug: ['pw:api']
logger: {
isEnabled: (name, severity) => name === 'browser',
log: (name, severity, message, args) => console.log(`${name} ${message}`)
}
});
...
})();
I do not want to just set DEBUG=pw:api
to print to stdout but I want these specific logs only sent to the Logger so I can save it in a file during my runs. It is a great tool combined with a video, to see when something fails.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:8 (6 by maintainers)
Top Results From Across the Web
How to Debug Web API Problems in 4 Steps - Kill All Defects
In my experience, the most helpful thing to do is to determine where the error is occurring – if the client is sending...
Read more >Debugging best practices for REST API consumers
The first step is to isolate the API issue and determine if the issue stems from calling the API, the API itself, processing...
Read more >How to Debug REST Requests - Better Programming
Find that annoying bug by spying on the data being exchanged in four different ways.
Read more >How to remove all debug logging calls before building the ...
I find a far easier solution is to forget all the if checks all over the place and just use ProGuard to strip...
Read more >Debugging API calls - DocuSign
As appropriate to your question, include your code, the API log, and any other relevant information. Don't include private information, your ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Bumping this because I would like to see if this could be improved. My team’s scenario is that they would like to log to a file or other logging sinks using something like winston. The only workaround I’ve found is to redirect output to a file like
DEBUG=pw:api npx playwright test &> playwright-api.log
Why was this issue closed?
We are prioritizing the bugs based on the upvotes, recency and our ability to act. It looks like this issue only has a handful of upvotes, has not been touched recently and/or we lack sufficient feedback to act on it. We are closing issues like this one to keep our bug database maintainable. Please feel free to open a new issue and link this one to it if you think this is a mistake.