Collection of helper macros for logging some events only once.
This crate provide macro in the
log_once family (
trace_once!, ...); that only send a logging event once for every message.
It rely and uses the logging infrastructure in the log crate; and
is fully compatible with any logger implementation.
These macro will store the already seen messages in a
BTreeSet, and check
if a message is in the set before sending the log event.
- Add it to your
 = "0.3"
- import the macros:
use info; use ;
log-once is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.