-
Notifications
You must be signed in to change notification settings - Fork 21
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
refactor: switch from env_logger to tracing logger #194
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.
Trying it locally, I see some log messages with color, but some without, specifically those from trustify_module_graph
. Is that expected?
No, that sounds strange. Can you share more details? Screenshot maybe? |
I moved this back to draft, as I am actually missing some log records. I need some more time to check this. Still, a screenshot would be good. |
I found the reason for the missing log events. I also re-added the target, I think it's useful (the module/crate). However, I still don't see any non-colored events. |
The issue with the missing logs is now solved. I can't reproduce the other (non colored logs). |
This PR also contains a fix for the server not starting up with auth-disabled when no SSO server is running. |
Is this an artifact of |
Ah yes, that's a bug in test-log: d-e-s-o/test-log#48 …let's see if that gets merged. Basically there are two frameworks mixed: log and tracing. |
However, this scope of this PR also is only the binary, not the tests. And yes, we should have the same behavior for tests IMO. But that requires the patch/fix on the test_log side. |
Instead of pushing tracing events to log, and from log to env_logger, this consumes log into tracing, and then logs those with trace spans in mind. This mostly means that trace spans only get logged when they fail. It still uses the RUST_LOG variable, and defaults to INFO. On top of that, there's color.
* drop unnecessary env_logger * sort
84c7410
to
48abe0d
Compare
Instead of pushing tracing events to log, and from log to env_logger, this consumes log into tracing, and then logs those with trace spans in mind.
This mostly means that trace spans only get logged when they fail.
It still uses the RUST_LOG variable, and defaults to INFO.
On top of that, there's color: