-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Use Single Log File in E2E #11810
Use Single Log File in E2E #11810
Conversation
Can you elaborate a bit more on the purpose of this PR? Were the stdout logs empty or just not useful? |
What about piping stdout and stderr to the same log file? The validator does have some logging to stdout because it is not using the proper logger when importing keystores (the progress bar goes to stdout) |
If you do this, depending on the size of log lines and exactly how writes are buffered (line-wise vs flush-when-full), you may wind up getting some interleaved log lines, like... .0001% of the time. Odds of that happening could be orders of magnitude higher in programs that write to stdout a lot. But ours don't, so it would be very rare. We shouldn't ever be writing meaningful information to stdout - stdout is for data to move between programs in pipes, stderr is for human readable things, like logs. That said, IMO we either want stdout, in which case we should update this PR to only change the behavior of bootnode (which already writes both out&err to the same file), or we don't care about stdout, in which case we should stop writing it to disk. I vote for dropping it, because it adds no value and dropping it makes things simpler - less files, less lines of code, and no one will ever have to look at this code and wonder "are these going to the same file intentionally? which log lines are coming from stdout and which from stderr?". Here's what we would lose:
The validator log is... a progress bar:
|
Thank for the context @kasey. LGTM
|
What type of PR is this?
Cleanup
What does this PR do? Why is it needed?
stderr
to a file. This prevents us from havingstdout
logs in our artifacts which do not provide any new information.Which issues(s) does this PR fix?
N.A
Other notes for review