diff options
author | Alex Auvolat <alex@adnab.me> | 2020-12-04 13:58:34 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-12-04 13:58:34 +0100 |
commit | b63179c699e0569d45826bccb4b9f2f1bc53c30e (patch) | |
tree | 7472ccda59d37531edbb3ffeff207edef51ee09d /examples/fullmesh.rs | |
parent | 56c524bbea64a85d7ced56406b0855041783845f (diff) | |
download | netapp-b63179c699e0569d45826bccb4b9f2f1bc53c30e.tar.gz netapp-b63179c699e0569d45826bccb4b9f2f1bc53c30e.zip |
Logging
Diffstat (limited to 'examples/fullmesh.rs')
-rw-r--r-- | examples/fullmesh.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/examples/fullmesh.rs b/examples/fullmesh.rs index af315fb..a61ab3d 100644 --- a/examples/fullmesh.rs +++ b/examples/fullmesh.rs @@ -28,7 +28,17 @@ pub struct Opt { #[tokio::main] async fn main() { - pretty_env_logger::init(); + env_logger::Builder::new() + .parse_env("RUST_LOG") + .format(|buf, record| { + writeln!(buf, + "{} {} {}", + chrono::Local::now().format("%s%.6f"), + record.level(), + record.args() + ) + }) + .init(); let opt = Opt::from_args(); |