[−][src]Macro gelf_logger::gelf_log
The standard logging macro.
This macro will generically log with the specified GelfLevel
, any struct which implement
Serialize
and format!
based argument list.
Examples
#[macro_use] extern crate gelf_logger; #[macro_use] extern crate serde_derive; use serde_gelf::GelfLevel; #[derive(Serialize)] struct Myapp { name: String, version: String, } fn main() { gelf_log!(level: GelfLevel::Error, "Hello!"); let myapp = Myapp {name: "myapp".into(), version: "0.0.1".into()}; gelf_log!(level: GelfLevel::Debug, extra: &myapp); }