Skip to main content

log

Macro log 

Source
macro_rules! log {
    ($msg:expr $(,)?) => { ... };
    ($worker:expr, $msg:expr $(,)?) => { ... };
}
👎Deprecated since 0.1.1:

use info!(), error!(), warn!(), fatal!() macro instead

Expand description

A lightweight, zero-dependency macro for printing structured debug output to stdout.

This macro is a no-op in release builds (#[cfg(debug_assertions)] guards every call). Output is formatted with a right-aligned “worker” label followed by the message.

§Examples

use webdav_server::log;

// Simple message with no label
log!("Server started");

// Labeled message (label is right-aligned to 12 characters)
log!("SERVER", "Listening on port 6969");
log!("STORAGE", format!("committed: {}", "some_file.bin"));