logger_feature

Function logger_feature 

Source
pub fn logger_feature(
    app: &str,
    debug_level: impl Into<DebugLevel>,
    prod_level: LevelFilter,
    log_etc_reset: bool,
) -> LoggerFeatureBuilder
Expand description

let _ = custom_utils::logger::logger_feature(“lapce”, “warn,wgpu_core=error,lapce_app::keypress::loader=info”, log::LevelFilter::Info, true) .build(); let _ = custom_utils::logger::logger_feature(“lapce”, log::LevelFilter::Debug, log::LevelFilter::Info, true) .build();

根据feature来确定日志输出 log_etc_reset 配置文件每次重启都重置 dev:控制台输出 prod:在目录{user_home}/log/{app}输出日志; 每天或大小达到10m更换日志文件; 维持10个日志文件; 生成{user_home}/etc/{app}/logspecification.toml的动态配置文件