From c6ec79c5242dec9ae959eadd953ad4025948f510 Mon Sep 17 00:00:00 2001 From: loki Date: Tue, 27 Jun 2023 19:42:44 +0100 Subject: [PATCH] shorter timestamp for non-tracing logs --- README.md | 2 +- pkg/proc/log/log.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 479b263e..3757ba5b 100644 --- a/README.md +++ b/README.md @@ -63,5 +63,5 @@ arbitrary hidden service addresses such as web applications. notes: -`([a-zA-z0-9\_\-\.][a-zA-z0-9\/\_\-\.]+)\:([0-9]+) ([a-zA-z0-9\_\-\.][a-zA-z0-9\/\_\-\.]+)\:([0-9]+)` is a regex that +`([a-zA-z0-9\_\-\.][a-zA-z0-9\/\_\-\.]+)\:([0-9]+)` is a regex that matches the relative file paths in the log output. $1 and $2 from this are the relative path and the line number. \ No newline at end of file diff --git a/pkg/proc/log/log.go b/pkg/proc/log/log.go index 9319c90b..a773a647 100644 --- a/pkg/proc/log/log.go +++ b/pkg/proc/log/log.go @@ -386,7 +386,7 @@ func logPrint( if level > logLevel { return } - tsf := timeStampFormat + tsf := "15:04:05" timeText := getTimeText(tsf) var loc string if int(Longest.Load()) < len(loc) { @@ -397,6 +397,7 @@ func logPrint( if logLevel > Info { loc = GetLoc(3, subsystem) loc = loc + strings.Repeat(" ", int(Longest.Load())-len(loc)+1) + tsf = timeStampFormat } var app string if len(App.Load()) > 0 {