tracing/tracing-subscriber
SnoozeTime 179c08a01e subscriber: Remove ansi for time when ansi = false (#354)
* subscriber: Remove ansi for time when ansi = false

When ansi feature is enabled and subscriber is created with with_ansi =
false, the time is now written without ansi codes as it should be. Added
integration tests to verify the behaviour.

I also noticed compilation errors when disabling the ansi feature due
to the deny gate (unused, missing dyn, lifetime). Those problems are
also fixed in this commit. Some structs have unused field (`ansi` in
fmt::format) so a `#[allow(unused)]` was added...

Fixes: #300

* subscriber: Remove is_ansi member when compiling without ansi feature

Using feature gates to remove the dependency on `is_ansi` field in 
fmt/format.rs structs. It is a bit redundant but now the basic structures
used to format the event are not using the `is_ansi` bool anymore.

* subscriber: Move common test utility to fmt/mod.rs

The `MockWriter` and `MockMakeWriter` are used in both writer.rs and
format.rs tests. Move them to a common test module so that they
can be used anywhere else.
2019-09-26 08:30:56 -07:00
..

tracing-subscriber

Utilities for implementing and composing tracing subscribers.

Crates.io Documentation Documentation (master) MIT licensed Build Status Gitter chat maintenance status

Documentation | Chat

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tracing by you, shall be licensed as MIT, without any additional terms or conditions.