debug icon indicating copy to clipboard operation
debug copied to clipboard

Redirect logs to file doesnt capture time

Open puagarwa opened this issue 1 year ago • 2 comments

https://github.com/microsoft/playwright uses debug module for logging. While using playwright i observed that when using DEBUG_FILE env variable to redirect these logs to file, it doesnt show time whereas when we output it to console, it shows time.

Expected

pw:api => selectors.setTestIdAttribute started +0ms pw:api => browserType.launch started +7ms

Actual

pw:api => selectors.setTestIdAttribute started pw:api => browserType.launch started

down stream issue https://github.com/microsoft/playwright/issues/27477

puagarwa avatar Oct 07 '23 11:10 puagarwa

I noticed the same thing. You can set the env DEBUG_COLORS=yes and get the ms, but if you are redirecting to a text file, it will still include the colour formatting characters.

paulconnexone avatar Nov 20 '23 22:11 paulconnexone

I noticed the same thing. You can set the env DEBUG_COLORS=yes and get the ms, but if you are redirecting to a text file, it will still include the colour formatting characters.

I tried it but i still didnt get time in log file.

puagarwa avatar Nov 21 '23 16:11 puagarwa