Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
twiby authored and borntyping committed Nov 23, 2023
1 parent 204b708 commit b8c149b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,27 @@ Multiple features can be combined.
features = ["colors", "threads", "timestamps", "nightly", "stderr"]
```

Wrapping with another logger
----------------------------

Users that might want to wrap this logger to be able to catch log events for various
reasons can setup the logger as follows:

On windows machines:
```rust
let logger = SimpleLogger::new();
set_up_color_terminal();
let max_level = logger.max_level();
```

Otherwise:
```rust
let logger = SimpleLogger::new();
let max_level = logger.max_level();
```

The user can then themselves call `log::set_max_level` and `log::set_boxed_logger` or equivalent as they wish.

Licence
-------

Expand Down

0 comments on commit b8c149b

Please sign in to comment.