-
Notifications
You must be signed in to change notification settings - Fork 747
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
Remove trace logging #6103
Remove trace logging #6103
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I support this. I would even be on board with deleting all uses of trace!
eventually, due to how useless they are.
Usually if we want to debug something, we'll add a debug
log.
I think this is a breaking change because users who are running with |
Will they get an error, or will it just not output anything? |
I'll compile and test it |
Ok yeah it's fine, it doesn't error, it just drops the trace logs. |
@mergify queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 77d491b |
The instance of useful trace logs I have seen is in debugging sync tests, where the log is valuable on a single run of sync 1 block but would be to noisy if enabled in prod. We could replace the trace log with #[cfg(test)]
debug!() |
* Remove trace logging
In practice I do not use trace logging and I don't know if anyone else does.
The way slog works is it passes these logs into its own task and then filters based on the log level. We are currently compiling with trace logging, which I would imagine has a non-negligible performance hit by producing all the trace logging then filtering them out.
Even when we are debugging we rarely use trace-level logging (to my knowledge). Even if we wanted to use them, we would have to restart the client as most default configurations favour debug-level.
For those really wanting trace-level logging, I propose they re-compile lighthouse to enable it, to spare everyone else not using tracing from generating and filtering the logs.