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

feat(config): Allow config to control ansi encoding in logs #109

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

john-z-yang
Copy link
Member

No description provided.

@john-z-yang john-z-yang marked this pull request as ready for review December 24, 2024 19:03
@john-z-yang john-z-yang requested a review from a team as a code owner December 24, 2024 19:03
@@ -114,8 +118,9 @@ pub fn init(log_config: LoggingConfig) {
.with_span_list(true)
.with_file(true)
.with_line_number(true)
.with_ansi(log_config.with_ansi)
Copy link
Member

Choose a reason for hiding this comment

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

When would we want JSON logging with escape codes?

.boxed(),
LogFormat::Text => subscriber.compact().boxed(),
LogFormat::Text => subscriber.compact().with_ansi(log_config.with_ansi).boxed(),
Copy link
Member

Choose a reason for hiding this comment

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

Another approach would be to have text (with-ansi) and plaintext (or a similar name) that doesn't feature ansi formatting.

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.

4 participants