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

#231 in Concurrency

Download history 25847/week @ 2024-11-18 26087/week @ 2024-11-25 32379/week @ 2024-12-02 36923/week @ 2024-12-09 32822/week @ 2024-12-16 7620/week @ 2024-12-23 10502/week @ 2024-12-30 32126/week @ 2025-01-06 35117/week @ 2025-01-13 31530/week @ 2025-01-20 35838/week @ 2025-01-27 33517/week @ 2025-02-03 34771/week @ 2025-02-10 31344/week @ 2025-02-17 35443/week @ 2025-02-24 34934/week @ 2025-03-03

137,227 downloads per month
Used in 14 crates (6 directly)

MPL-2.0/MIT/Apache-2.0

18KB
50 lines

slog-rs logo
Travis CI Build Status slog-atomic on crates.io slog-rs Gitter Chat

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