Skip to main content

init_logging

Function init_logging 

Source
pub fn init_logging(options: LogOptions) -> Result<(), LoggingError>
Examples found in repository?
examples/common/mod.rs (line 32)
31pub fn init_example_logging() {
32    let _ = init_logging(LogOptions::default());
33}
More examples
Hide additional examples
examples/logging.rs (lines 9-12)
6fn main() {
7    // EN: `init_logging` is optional; hooks work without it.
8    // CN: `init_logging` 是可选的;不初始化日志也能正常 hook。
9    let _ = init_logging(LogOptions {
10        level: LogLevel::Info,
11        output: LogOutput::Terminal,
12    });
13
14    log::info!("hello from dobby-rs-framework example");
15}