[−][src]Function mhlog::init
pub fn init<T: ToString>(
level: Lvl,
prog_name: T,
write2file: bool
) -> Result<(), LogError>
Initialize mhlog. It is not necessary to do initialization before calling
the logging macros. Default logging level before initialization is performed
is Lvl::Important
.
Initialization can only be done once. If called more than once nothing happens.
During initialization the logging level is set, and if write2file
argument
is true
the log file is opened. prog_name
argument is used to name the
log file: ~/.log/<prog_name>.log
.