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

At test runs, write to logfile in the same format as to stdout. #1

Draft
wants to merge 1 commit into
base: converge-discovery-logfile
Choose a base branch
from

Conversation

aspotashev
Copy link
Owner

Example of affected command:

cargo test -- --logfile=/tmp/1.log

Old format:

ok whatever

New format:


running 1 test
test whatever ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

Rationale for the behavior change:

  • The code becomes easier to maintain: we reuse the same code to generate output into stdout and into log file
  • Fix user confusion, as they currently see different formats in stdout and in log file.

Example of affected command:

```
cargo test -- --logfile=/tmp/1.log
```

Old format:
```
ok whatever
```

New format:
```

running 1 test
test whatever ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

```

Rationale for the behavior change:
* The code becomes easier to maintain: we reuse the same code to generate output into stdout and into log file
* Fix user confusion, as they currently see different formats in stdout and in log file.
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

Successfully merging this pull request may close these issues.

1 participant