Redirect logs to file doesnt capture time

Open
#945 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
observability

Research direction

Start by reproducing the difference between DEBUG_FILE output and console output in the debug module, then trace the logging path used for each destination. Done means file output preserves the relative timestamps shown in console output, with tests covering both destinations.

Written by the indexing model from the issue text.

Description

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

Dominant language
JavaScript
Stars
11.5k
Forks
992
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from debug-js/debug

All issues in debug-js/debug

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.