[][src]Function log4rs_gelf::flush

pub fn flush() -> Result<(), Error>

Force current logger record buffer to be sent to the remote server.

It can be useful to perform a flush just before program exit.

Example

extern crate log4rs_gelf;

fn main() {
    log4rs_gelf::init_file("/tmp/log4rs.yml", None).unwrap();

    // Do whatever

    log4rs_gelf::flush().expect("Failed to send buffer, log records can be lost !");
}