# Macro log::log [−] [src]

    macro_rules! log {
        (target: $target:expr, $lvl:expr, $($arg:tt)+) => { ... };
        ($lvl:expr, $($arg:tt)+) => { ... };
    }

The standard logging macro.

This macro will generically log with the specified `LogLevel` and `format!` based argument list.

The `max_level_*` features can be used to statically disable logging at various levels.

# Examples

    use log::LogLevel;

    let data = (42, "Forty-two");
    let private_data = "private";

    log!(LogLevel::Error, "Received errors: {}, {}", data.0, data.1);
    log!(target: "app_events", LogLevel::Warn, "App warning: {}, {}, {}",
        data.0, data.1, private_data);

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)