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

#212 in Concurrency

Download history 28909/week @ 2024-10-13 33347/week @ 2024-10-20 28200/week @ 2024-10-27 28067/week @ 2024-11-03 24129/week @ 2024-11-10 25702/week @ 2024-11-17 26121/week @ 2024-11-24 32408/week @ 2024-12-01 36895/week @ 2024-12-08 32973/week @ 2024-12-15 7575/week @ 2024-12-22 10615/week @ 2024-12-29 31859/week @ 2025-01-05 35023/week @ 2025-01-12 31584/week @ 2025-01-19 35104/week @ 2025-01-26

134,161 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