Struct simplelog::ConfigBuilder [−][src]
#[non_exhaustive]pub struct ConfigBuilder(_);
Expand description
Builder for the Logger Configurations (Config
)
All loggers print the message in the following form:
00:00:00 [LEVEL] crate::module: [lib.rs::100] your_message
Every space delimited part except the actual message is optional.
Use this struct to create a custom Config
changing when these information shall
be logged. Every part can be enabled for a specific Level and is then
automatically enable for all lower levels as well.
The Result is that the logging gets more detailed the more verbose it gets.
E.g. to have one part shown always use Level::Error
. But if you
want to show the source line only on Trace
use that.
Implementations
Create a new default ConfigBuilder
Set at which level and above (more verbose) the level itself shall be logged (default is Error)
Set at which level and above (more verbose) the current time shall be logged (default is Error)
Set at which level and above (more verbose) the thread id shall be logged. (default is Debug)
Set at which level and above (more verbose) the target shall be logged. (default is Debug)
Set at which level and above (more verbose) a source code reference shall be logged (default is Trace)
Set how the levels should be padded, when logging (default is Off)
Set how the thread should be padded
Set the mode for logging the thread
Set the color used for printing the level (if the logger supports it), or None to use the default foreground color
Set time chrono strftime format string.
Set time chrono strftime format string.
Set offset used for logging time (default is 0)
set if you log in local timezone or UTC (default is UTC)
Add allowed module filters. If any are specified, only records from modules starting with one of these entries will be printed
For example, add_filter_allow_str("tokio::uds")
would allow only logging from the tokio
crates uds
module.
Add allowed module filters. If any are specified, only records from modules starting with one of these entries will be printed
For example, add_filter_allow(format!("{}{}","tokio", "uds"))
would allow only logging from the tokio
crates uds
module.
Clear allowed module filters. If none are specified, nothing is filtered out
Add denied module filters. If any are specified, records from modules starting with one of these entries will be ignored
For example, add_filter_ignore_str("tokio::uds")
would deny logging from the tokio
crates uds
module.
Add denied module filters. If any are specified, records from modules starting with one of these entries will be ignored
For example, add_filter_ignore(format!("{}{}","tokio", "uds"))
would deny logging from the tokio
crates uds
module.
Clear ignore module filters. If none are specified, nothing is filtered
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl UnwindSafe for ConfigBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more