diff options
author | Brian Cully <bjc@kublai.com> | 2019-07-27 17:57:57 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2019-07-27 17:57:57 -0400 |
commit | 5759c640e06f0223e958ac49793dcf8a4af1c990 (patch) | |
tree | 09bd45ce1bb86a17eda42da50a0b924861dc9384 | |
parent | e0a9f75354564b22ef41b4a3a58e5ff321a3fc25 (diff) | |
download | samd21-demo-5759c640e06f0223e958ac49793dcf8a4af1c990.tar.gz samd21-demo-5759c640e06f0223e958ac49793dcf8a4af1c990.zip |
Put milliseconds since boot in log output.
-rw-r--r-- | app/src/logger.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/logger.rs b/app/src/logger.rs index 5ef08f7..9f9452e 100644 --- a/app/src/logger.rs +++ b/app/src/logger.rs @@ -1,3 +1,4 @@ +use crate::rtc; use rb::{Reader, RingBuffer, Writer}; use core::cell::UnsafeCell; @@ -94,7 +95,8 @@ where let jrb = unsafe { &mut JRB }; write!( jrb, - "[{}] {} -- {}\r\n", + "[{}] {} {} -- {}\r\n", + rtc::millis(), record.level(), record.target(), record.args() |