pub fn try_to_set_log_level(level: LevelFilter) -> CommonResult<String>
Expand description

If you don’t call this function w/ a value other than LevelFilter::Off, then logging is DISABLED by default. It won’t matter if you call any of the other logging functions in this module.

It does not matter how many times you call this function, it will only set the log level once. If you want to change the default file that is used for logging take a look at try_to_set_log_file_path.

If you want to override the default log level LOG_LEVEL, you can use this function. If the logger has already been initialized, then it will return a CommonErrorType::InvalidState error. To disable logging simply set the log level to LevelFilter::Off.

If you would like to ignore the error just call ok() on the result that’s returned. More info.