Drakulix / simplelog.rs

Simple Logging Facility for Rust
https://docs.rs/simplelog/
Apache License 2.0
423 stars 71 forks source link

Examples do not unwrap TermLogger #61

Closed enderger closed 3 years ago

enderger commented 4 years ago

In the current version of simplelog, it seems that you need to unwrap the option containing a TermLogger when initializing the CombinedLogger

John-Nagle commented 3 years ago

Yes. Compiling the example from the web site gives:

error[E0599]: no method named `unwrap` found for struct `std::boxed::Box<simplelog::TermLogger>` in the current scope
  --> src/main.rs:11:88
   |
11 |             TermLogger::new(LevelFilter::Warn, Config::default(), TerminalMode::Mixed).unwrap(),
   |                                                                                        ^^^^^^ method not found in `std::boxed::Box<simplelog::TermLogger>`

error: aborting due to previous error
Drakulix commented 3 years ago

Fixed by #60