feat(logging): use local timezone for log timestamps
Replace default UTC timer with ChronoLocal::rfc_3339() so daemon and CLI log lines display the operator's local time, making correlation with external events easier. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b556a4bdce
commit
b36dd3aa81
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -6639,6 +6639,7 @@ version = "0.3.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"matchers",
|
||||
"nu-ansi-term",
|
||||
"once_cell",
|
||||
|
||||
@ -46,7 +46,7 @@ schemars = "1.2"
|
||||
|
||||
# Logging - minimal
|
||||
tracing = { version = "0.1", default-features = false }
|
||||
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "ansi", "env-filter"] }
|
||||
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "ansi", "env-filter", "chrono"] }
|
||||
|
||||
# Observability - Prometheus metrics
|
||||
prometheus = { version = "0.14", default-features = false }
|
||||
|
||||
@ -713,6 +713,7 @@ async fn main() -> Result<()> {
|
||||
|
||||
// Initialize logging - respects RUST_LOG env var, defaults to INFO
|
||||
let subscriber = fmt::Subscriber::builder()
|
||||
.with_timer(tracing_subscriber::fmt::time::ChronoLocal::rfc_3339())
|
||||
.with_env_filter(
|
||||
EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")),
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user