Skip to content

Commit

Permalink
Switch timestamp format from local to UTC in ISO 8601 format
Browse files Browse the repository at this point in the history
  • Loading branch information
erdemyerebasmaz committed Nov 5, 2024
1 parent e1d4683 commit 9f22d19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/sdk-core/src/logger.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::models::LevelFilter as BindingLevelFilter;
use crate::{LogEntry, LogStream};
use anyhow::{anyhow, Result};
use chrono::Local;
use env_logger::{Builder, Logger, Target};
use flutter_rust_bridge::StreamSink;
use lazy_static::lazy_static;
Expand All @@ -13,6 +12,7 @@ use parking_lot::RwLock;
use std::fs::OpenOptions;
use std::io::Write;

use chrono::Utc;
use std::sync::Once;

/* env_logger */
Expand Down Expand Up @@ -65,7 +65,7 @@ fn init_env_logger(target: Option<Target>, filter_level: Option<LevelFilter>) ->
writeln!(
buf,
"[{} {} {}:{}] {}",
Local::now().format("%Y-%m-%d %H:%M:%S%.3f"),
Utc::now().to_rfc3339(),
record.level(),
record.module_path().unwrap_or("unknown"),
record.line().unwrap_or(0),
Expand Down

0 comments on commit 9f22d19

Please sign in to comment.