Skip to content

Why is console.log/info forwarded to stderr? Producing confusing logs. #1849

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

Closed
dewdad opened this issue Jun 25, 2018 · 3 comments
Closed

Why is console.log/info forwarded to stderr? Producing confusing logs. #1849

dewdad opened this issue Jun 25, 2018 · 3 comments

Comments

@dewdad
Copy link

dewdad commented Jun 25, 2018

I'm using frontend-maven-plugin to run JS tests for our project and I have the following output which is very confusing.

image 002

The logging we produce in order to trace our tests' execution is all logged as [ERROR]

ava 1.0.0-beta.6
node 10.5.0
npm 6.1.0

@novemberborn
Copy link
Member

It's to separate AVA's output from your program's output. For example with the TAP reporter we can't mix them up.

The answer might be to configure your logger to not output anything when tests are running, or to discard stderr in CI.

(I'm closing this issue for housekeeping purposes, but let's keep the conversation going.)

@dewdad
Copy link
Author

dewdad commented Jun 28, 2018

Can't this be managed with streams? Use one stream specifically for AVAs output and pipe it at the end to stdout or a file.

@novemberborn
Copy link
Member

That's pretty much what we do, except that all non-AVA output is written to stderr.

I wonder if, unless --verbose is set, AVA should not print any non-AVA output. Perhaps with a message at the end that output was silenced.

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