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

Add JSON as an option for logging by env var #960

Closed
wants to merge 1 commit into from

Conversation

DaveWK
Copy link
Contributor

@DaveWK DaveWK commented Dec 23, 2022

No description provided.

.finish();
tracing::subscriber::set_global_default(my_collector)
.wrap_err("Failed to set log subscriber")
let json_format = if let Ok(val) = env::var(JSON_ENV_KEY) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes the json fmt the default

@tzemanovic
Copy link
Member

thanks @DaveWK ! I've added couple more changes to keep the "full" fmt as the default and also to allow to use "pretty" fmt in #968. Will merge from there

@tzemanovic tzemanovic closed this Dec 28, 2022
@DaveWK DaveWK deleted the jsonlogging branch January 12, 2023 18:02
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.

2 participants