aboutsummaryrefslogtreecommitdiff
path: root/examples/fullmesh.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-12-04 13:58:34 +0100
committerAlex Auvolat <alex@adnab.me>2020-12-04 13:58:34 +0100
commitb63179c699e0569d45826bccb4b9f2f1bc53c30e (patch)
tree7472ccda59d37531edbb3ffeff207edef51ee09d /examples/fullmesh.rs
parent56c524bbea64a85d7ced56406b0855041783845f (diff)
downloadnetapp-b63179c699e0569d45826bccb4b9f2f1bc53c30e.tar.gz
netapp-b63179c699e0569d45826bccb4b9f2f1bc53c30e.zip
Logging
Diffstat (limited to 'examples/fullmesh.rs')
-rw-r--r--examples/fullmesh.rs12
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();