Struct loglog::LogLogBuilder
[−]
[src]
pub struct LogLogBuilder { /* fields omitted */ }
The main logger builder.
Methods
impl LogLogBuilder
[src]
fn init(self) -> Result<(), SetLoggerError>
Start the logger with the constructed settings.
fn time(self, time_format: Option<&str>) -> Self
Set the timestamp format to be used. If None is given, the timestamp is disabled.
By default, the timestamp is displayed, and the format is %H:%M:%S
.
fn target(self, show: bool) -> Self
Enable or disable the output of the "log target". For example, for a
module zmod
in a crate zcrate
, this would be zcrate::zmod
.
By default, the displaying the target is not enabled.
fn colour(self, show: bool) -> Self
Enable or disable coloured output. Note that colours are automatically disabled if the terminal doesn't support them.
By default, colours are enabled.
fn stdout(self, enable: bool) -> Self
Enable or disable output to stdout
.
By default, logs are sent to stderr
.
fn select(self, selector: &str) -> Self
Specify the env_logger
selector.
By default, this will be pulled from the environment variable RUST_LOG
, and if that variable doesn't exist, debug
will be used.