Skip to content

Conversation

@gruuya
Copy link
Contributor

@gruuya gruuya commented Jan 24, 2024

Also enable JSON logging, closes #492.

Couple of follow-ups:

  • The default logger swallows up the target from libraries that are using plain log when converting them to tracing events, which obfuscates the source of those messages. They're still available in the JSON output in the fields.log.target field. Opened Enable overriding target field with log's target in LogTracer tokio-rs/tracing#2862 for that.
  • The timestamp and target fields are dimmed now, whereas they were bold previously.

@gruuya gruuya requested a review from mildbyte January 24, 2024 13:18
builder
.parse_filters(
env::var(env_logger::DEFAULT_FILTER_ENV)
.unwrap_or_else(|_| "sqlx=warn,info".to_string())
Copy link
Contributor

Choose a reason for hiding this comment

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

think there was a reason for this sqlx default (it's too spammy by default or vice versa, don't remember)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah seems like it was to spammy: 398b994

However I'm not seeing this anymore (nothing appears by default on INFO level).

@gruuya gruuya merged commit 5701cc0 into main Jan 25, 2024
@gruuya gruuya deleted the add-json-logging branch January 25, 2024 09:36
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.

Introduce JSON logging option

3 participants