high performance multi-thread log implement in rust
use the newest version from crate.io (recommand)
toml
[dependencies]
hp-log = "0.3.0"
use the newest version by git
toml
[dependencies]
hp-log = {git = "https://github.com/wtu-sos/hp-log.git"}
``` toml
globalmaxlevel = "TRACE" [console_conf] switch = true # Whether the output is on the console debug = true info = true warn = true error = true fatal = true
[file_conf] switch = true # Whether to output in the log file debug = true info = true warn = true error = true fatal = true
filelogdir = "/tmp/log/" filetempbuf = "1048576"
```
``` rust
extern crate hp_log;
extern crate log;
fn main() { hplog::init("./".tostring());
trace!("main running ````````````````````");
info!("main running info");
debug!("main running .........................");
warn!("main running ****************");
error!("main running +++++++++++++++++++++++++");
hp_log::close();
} ```
hp-log
is distributed under the terms of the Apache License (Version 2.0).
See LICENSE for details.
Copyright 2018 wtu-sos