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

Download history 16618/week @ 2024-07-21 19125/week @ 2024-07-28 17773/week @ 2024-08-04 18287/week @ 2024-08-11 17993/week @ 2024-08-18 20648/week @ 2024-08-25 25554/week @ 2024-09-01 23274/week @ 2024-09-08 21838/week @ 2024-09-15 21455/week @ 2024-09-22 20409/week @ 2024-09-29 15570/week @ 2024-10-06 28909/week @ 2024-10-13 33347/week @ 2024-10-20 28200/week @ 2024-10-27 27417/week @ 2024-11-03

118,592 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