pub fn init(config: Config) -> Result<(), SetLoggerError>
Expand description
Initializes the logger by setting it as the global boxed logger for the log
crate.
§Arguments
config
: AConfig
instance that specifies the settings for the logger. UseDefault::default()
for the default settings.
§Returns
Ok(())
if the logger was successfully initialized.Err(SetLoggerError)
if the logger failed to initialize for any reason.
§Panics
This function will panic if it fails to create the log directory or the log file. This can happen if the user does not have the required permissions.