macro_rules! debug {
(logger: $logger:expr, target: $target:expr, $($arg:tt)+) => { ... };
(logger: $logger:expr, $($arg:tt)+) => { ... };
(target: $target:expr, $($arg:tt)+) => { ... };
($($arg:tt)+) => { ... };
}Expand description
Logging (docs/logging.md). day::info!("…") and friends are the log crate’s macros,
re-exported so an app needs no log dependency of its own for the common case. Because they
are log’s, anything that speaks log (env_logger, tracing-log, a hand-written
log::Log) works without adapters.
Day installs a default logger at launch, so these come out with no setup on every platform:
stderr natively, the browser console on web-dom. An app that wants something else calls
log::set_logger (or env_logger::init()) before day::launch and keeps it.
Logs a message at the debug level.
§Examples
use log::debug;
let pos = Position { x: 3.234, y: -1.223 };
debug!("New position: x: {}, y: {}", pos.x, pos.y);
debug!(target: "app_events", "New position: x: {}, y: {}", pos.x, pos.y);
debug!(logger: my_logger, "New position: x: {}, y: {}", pos.x, pos.y);