Crate slog_mock[][src]

Crate to mock slog objects and macros.

This exports many expected pieces of functionality from the slog crate, but has them compile into no-ops.

The goal is to allow a crate consumer to have a feature where this crate is used instead of slog, and all logging calls resolve cleanly but don’t produce any code in the final binary.

Not all of slog’s functionality is mocked: you will need to gate any actual requirements on its traits or structures behind #[cfg(feature)] checks.

Macros

crit

Dummy logging macro, mimics slog::crit!.

debug

Dummy logging macro, mimics slog::debug!.

error

Dummy logging macro, mimics slog::error!.

info

Dummy logging macro, mimics slog::info!.

o

Dummy logging macro, mimics slog::o!.

slog_o

Dummy logging macro, mimics slog::slog_o!.

trace

Dummy logging macro, mimics slog::trace!.

warn

Dummy logging macro, mimics slog::warn!.