slog/
prelude.rs

1//! A set of common imports needed by most programs that use `slog`.
2//!
3//! It is intended to be used like follows:
4//! ```
5//! use slog::prelude::*;
6//! fn my_func(logger: &Logger, x: i32) {
7//!     info!(logger, "slog rules!"; "x" => x);
8//!     if x < 0 {
9//!         warn!(logger, "negative numbers are scary"; "x" => x);
10//!     }
11//! }
12//! ```
13//!
14//! This includes the logging macros ([`log!`](crate::log), [`trace!`](crate::trace), ...) and [`slog::Logger`](crate::Logger).
15//! It also includes [`slog::Serde`] and [`slog::FnValue`], as those are frequently useful as well.
16//!
17//! Adding new items here is a breaking change,
18//! because it can cause conflicts with other bulk-imported modules.
19
20#[cfg(feature = "nested-values")]
21pub use crate::Serde;
22pub use crate::{crit, debug, error, info, log, trace, warn};
23pub use crate::{FnValue, Logger};