macro_rules! try_init_timed_short {
() => { ... };
}
Expand description
Initializes the global logger with an “abbreviated” timed pretty, sensible env logger.
This should be called early in the execution of a Rust program, and the global logger may only be initialized once. Future initialization attempts will return an error.
Details
This variant formats log messages with a localized timestamp, without the date part.
Example
12:15:31.683 INFO my_module > an info message!
Requirements
Using this macro requires the local-time
feature to be enabled:
[dependencies]
sensible-env-logger = { version = "*", features = ["local-time"] }
Errors
This macro fails to set the global logger if one has already been set.