Map pulse to timestamp
This commit is contained in:
@@ -103,7 +103,7 @@ const MAX_TOTAL_SIZE: usize = 1024 * 1024 * 20;
|
||||
|
||||
fn next_file(dir: &Path, append: bool, truncate: bool) -> io::Result<BufWriter<fs::File>> {
|
||||
let ts = chrono::Utc::now();
|
||||
let s = ts.format("%Y-%m-%d--%H-%M-%SZ").to_string();
|
||||
let s = ts.format("%Y-%m-%d--%H-%M-%S").to_string();
|
||||
let ret = fs::OpenOptions::new()
|
||||
.write(true)
|
||||
.create(true)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
pub mod append;
|
||||
|
||||
use crate::log::*;
|
||||
use err::Error;
|
||||
use std::future::Future;
|
||||
@@ -80,6 +82,9 @@ pub fn tracing_init() {
|
||||
let mut g = INITMX.lock().unwrap();
|
||||
if *g == 0 {
|
||||
tracing_subscriber::fmt()
|
||||
.with_timer(tracing_subscriber::fmt::time::ChronoUtc::with_format(
|
||||
"%Y-%m-%dT%H:%M:%S%.3fZ".into(),
|
||||
))
|
||||
//.with_timer(tracing_subscriber::fmt::time::uptime())
|
||||
.with_target(true)
|
||||
.with_thread_names(true)
|
||||
|
||||
Reference in New Issue
Block a user