Function init_logger

Source
pub fn init_logger(module_name: &str, log_level: Option<SDKLogLevel>)
Expand description

Initialise the logging functionality to a certain level.

§Arguments

  • module_name - A string to denote the calling application. It can be any string. It does not have to match the exact application name.
  • log_level - The level of logging to use. If not given, will use default logging level.

§Example

use celp_sdk::logger::{SDKLogLevel, init_logger};

let app_name = "test";
let level = SDKLogLevel::default();

init_logger(app_name, Some(level));