10 releases (3 stable)
Uses old Rust 2015
3.1.0 | Mar 25, 2021 |
---|---|
3.0.0 | Aug 9, 2019 |
2.0.0 | Apr 30, 2017 |
0.4.3 | Nov 30, 2016 |
0.2.0 | Sep 9, 2016 |
#217 in Concurrency
118,592 downloads per month
Used in 13 crates
(6 directly)
18KB
50 lines
slog-atomic - Atomic run-time controllable drain for slog-rs
Using slog-atomic
you can create a slog::Drain
that can change behavior
in a thread-safe way, in runtime. This is useful eg. for triggering different
logging levels from a signal handler.
lib.rs
:
Slog runtime switchable drain
AtomicSwitch
allows swapping drain that it wraps atomically, race-free, in
runtime. This can be useful eg. for turning on debug logging
in production.
See signal.rs
example.
Dependencies
~340KB