macro_rules! init_timed_local_iso {
() => { ... };
}
Expand description
Initializes the global logger with a local-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 and zone, in complete ISO-8601/ RFC 3339 date & time format.
Example
2022-10-27T12:15:31.683+08:00 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"] }
Panics
This macro fails to set the global logger if one has already been set.