From 672b19b79f7fff259d186b423534a7195870a6de Mon Sep 17 00:00:00 2001 From: trivernis Date: Wed, 20 Apr 2022 18:37:31 +0200 Subject: [PATCH] Fix timestamp format in log entries Signed-off-by: trivernis --- src/logging.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/logging.rs b/src/logging.rs index 7769802..4970c3d 100644 --- a/src/logging.rs +++ b/src/logging.rs @@ -39,11 +39,14 @@ fn format_log_entry( let msg = record.args().to_string(); let level = record.level(); let msg = apply_uwu(level, msg); + let (h, m, s) = now.now().time().as_hms(); write!( w, - "[ {} ] {} {}", + "[ {} ] {}:{}:{} {}", style(level).paint(level.to_string()), - now.now(), + h, + m, + s, msg ) }