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

#181 in Concurrency

Download history 16775/week @ 2024-06-10 17104/week @ 2024-06-17 15429/week @ 2024-06-24 14429/week @ 2024-07-01 16712/week @ 2024-07-08 14406/week @ 2024-07-15 16688/week @ 2024-07-22 19131/week @ 2024-07-29 17602/week @ 2024-08-05 18327/week @ 2024-08-12 17959/week @ 2024-08-19 20766/week @ 2024-08-26 25444/week @ 2024-09-02 23374/week @ 2024-09-09 21737/week @ 2024-09-16 21679/week @ 2024-09-23

92,556 downloads per month
Used in 13 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