pub fn init_logger(args: &ArgMatches) {
    let filter = EnvFilter::from_env(LOG_ENV_VAR);
    let filter = if let Some(log_level) = args.value_of(parser::LOG_LEVEL) {
        filter.add_directive(Directive::from_str(log_level).unwrap())
    } else {
        filter
    };

    if args.is_present(parser::JSON_OUTPUT) {
        json_logs(filter);
    } else {
        hier_logs(filter);
    };
}
/// Initialize the logger using the KANI_LOG environment variable and the --log-level argument.
Initialize the logger using the KANI_LOG environment variable and the --log-level argument.
Initialize the logger using the KANI_LOG environment variable and the -- log - level argument .
pub fn init_logger(args: &ArgMatches) {
    let filter = EnvFilter::from_env(LOG_ENV_VAR);
    let filter = if let Some(log_level) = args.value_of(parser::LOG_LEVEL) {
        filter.add_directive(Directive::from_str(log_level).unwrap())
    } else {
        filter
    };
    if args.is_present(parser::JSON_OUTPUT) {
        json_logs(filter);
    } else {
        hier_logs(filter);
    };
}
pub fn init_logger ( args : & ArgMatches ) { let filter = EnvFilter :: from_env ( LOG_ENV_VAR ) ; let filter = if let Some ( log_level ) = args . value_of ( parser :: LOG_LEVEL ) { filter . add_directive ( Directive :: from_str ( log_level ) . unwrap ( ) ) } else { filter } ; if args . is_present ( parser :: JSON_OUTPUT ) { json_logs ( filter ) ; } else { hier_logs ( filter ) ; } ; }
Initialize the logger using the KANI_LOG environment variable and the --log-level argument.
Initialize the logger using the KANI_LOG environment variable and the -- log - level argument .
args
&ArgMatches