std_out_separate_thread_big_buf_capacity/big-buf-capacity.rs
1use rslogger::Logger;
2use log::{info, warn, error};
3
4fn main() {
5 Logger::new()
6 .with_level(log::LevelFilter::Trace)
7 .with_local_timestamps()
8 .add_writer_stdout(true, Some(1000))
9 .init().unwrap();
10
11 info!("This is a info test");
12 warn!("This is a warn test");
13 error!("This is an error test");
14
15 // Note: This method must be called only at the end of the program. After that, you can no longer log.
16 log::logger().flush();
17
18 // This would panic
19 // info!("Test");
20}