Skip to content

Conversation

@ctron
Copy link
Contributor

@ctron ctron commented Nov 17, 2025

No description provided.

@ctron ctron changed the title feat: allow using color for tracing and log feat: allow using specific formatters for tracing Nov 17, 2025
Copy link
Owner

@d-e-s-o d-e-s-o left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. It fails to build with cargo check --tests --no-default-features --features=trace. Please also revert spurious formatting changes.

In general I am not yet sold on us wanting such a change. There are more configurations available and there could be a case made for configurability of all of them -- and such support will add complexity with very little use. At the end of the day, who cares what format is being used for a given test. If it was for programmatic evaluation using JSON, perhaps there would be a stronger case. But again we run into similar problems to the above where an additional feature is required and it is rather cumbersome to enable that.

@ctron
Copy link
Contributor Author

ctron commented Nov 18, 2025

Sure, let me take a look and fix those issues.

who cares what format is being used for a given test.

I do, the default format of tracing feels quite unreadable. Using "pretty" at least gives some simple lines, allow to grep away the nested stuff.

@ctron
Copy link
Contributor Author

ctron commented Nov 18, 2025

Please also revert spurious formatting changes.

They seem to come from running cargo fmt. That isn't to be used?

@ctron
Copy link
Contributor Author

ctron commented Nov 18, 2025

Fixed the issue with cargo check --tests --no-default-features --features=trace.

Also reverted the changes from cargo fmt.

@ctron
Copy link
Contributor Author

ctron commented Nov 18, 2025

Fixed the issue with cargo check --tests --no-default-features --features=trace.

That change only fixed it for the command line. Not for a dependency. I'll need to take another look.

@ctron
Copy link
Contributor Author

ctron commented Nov 18, 2025

Fixed the issue with cargo check --tests --no-default-features --features=trace.

That change only fixed it for the command line. Not for a dependency. I'll need to take another look.

Looks good now.

@d-e-s-o
Copy link
Owner

d-e-s-o commented Nov 27, 2025

Thanks for the feature proposal. After some back and forth, I have decided to pass on this functionality: the complexity of the additional conditional compilation seems too high for such a niche feature (nobody has asked for it thus far) and there is no clear line to be drawn between these fixed formats and a fully blown language of sorts for making everything that tracing-subscriber allows to configure configurable through env variables.

@d-e-s-o d-e-s-o closed this Nov 27, 2025
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