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

Config option to disable colour in logs #1696

Open
mcpherrinm opened this issue Oct 31, 2024 · 0 comments
Open

Config option to disable colour in logs #1696

mcpherrinm opened this issue Oct 31, 2024 · 0 comments

Comments

@mcpherrinm
Copy link

We feed ntpd-rs' logs into a log search product.

While it works, it contains ansi escape codes.

For example,

 #033[2m2024-10-31T18:38:56.000846Z#033[0m #033[32m INFO#033[0m #033[2mntp_proto::algorithm::kalman#033[0m#033[2m:#033[0m Offset: -0.098332274256776+-0.2337313649729611ms, frequency: 0.04341250045413119+-0.07468081620691763ppm

While this is tolerable, and we could probably even post-process the logs, it would be nice to be able to opt-out of this.

I think in ntpd/src/daemon/tracing.rs, in tracing_init, we'd want a way to set .with_ansi(false) in the same way as the level filter.

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

No branches or pull requests

1 participant