Eliza Weisman

Results 571 comments of Eliza Weisman

Ah, sorry, I misinterpreted your comment (and didn't click the link), my bad. I think we probably want to do that when constructing the subscriber if the target OS is...

I'm fine with switching to `colored`. Currently, we do use `ansi-term`'s `Style` type to isolate the feature-flagging of ANSI support: https://github.com/tokio-rs/tracing/blob/8711f63cd8c135980edaca1570ce6878ffe34d7c/tracing-subscriber/src/fmt/format/mod.rs#L550-L559 with a no-op `Style` type when `ansi-term` is disabled:...

hmm, upon taking a closer look, it looks like `colored`'s methods always return a [`ColoredString` struct](https://docs.rs/colored/1.9.2/colored/struct.ColoredString.html) which [appears to always allocate a `String`](https://docs.rs/colored/1.9.2/src/colored/lib.rs.html#51), even when the input is borrowed. This...

> Add a new from impl for Directives `impl From for Directive` so that the following becomes valid. > > ```rust > filter.add_directive((module_path!(), Level::INFO).into()); > ``` I'm not convinced that...

> This would also make it possible to use `Into` as the argument type rather than `Directive`, which I believe would be a breaking change if applied to the `add_directive`...

Personally, I'd prefer not to have an infallible (panicking) `add_directive` _and_ a fallible `try_add_directive`, I'd prefer to just put the decision of whether to bubble up the error or panic...

@yaahc I think it's better to have one `add_directive` that's infallible and does not panic, and let the user use `?` or `expect`/`unwrap` if they want to call it with...

I think we should probably make a separate issue for potential changes to the `add_directive` API --- adding a programmatic builder for filters is not a breaking change, but reworking...

@Sushisource I would be happy to merge any PRs you open for this, and if you have any questions or need guidance, please let me know! :)

> Would a PR be appreciated? I would be happy to merge a pull request for programmatically creating directives --- this has been discussed previously a bit in https://github.com/tokio-rs/tracing/issues/404, so...