Macro mt_logger::mt_new [−][src]
macro_rules! mt_new {
($logfile_prefix : expr, $output_level : expr, $output_stream : expr) => { ... };
}
Expand description
Initializes the mt_logger
global instance.
Examples
Initialize the logger instance to log Info
-level messages and higher to both StdOut and a file.
The filename will be given the default prefix, see module-level documentation for full format.
mt_new!(None, Level::Info, OutputStream::Both);
Initialize the logger instance to log Trace
-level messages and higher to a file only.
The filename will be given the specified prefix.
mt_new!(Some("my_app_v2.3"), Level::Trace, OutputStream::File);