Skip to main content

init_on_addr

Function init_on_addr 

Source
pub fn init_on_addr(addr: &str)
Expand description

Inits Logger on given addr and sets it as the logger for log

Examples found in repository?
examples/log.rs (line 14)
13fn main() {
14    init_on_addr("127.0.0.1:8080");
15    log::info!("The logger seems to work");
16    std::thread::sleep(Duration::from_secs(1)); // If the main thread finishes before the logs
17    // are sent the logs cannot be delivered
18}