shorter timestamp for non-tracing logs

This commit is contained in:
loki
2023-06-27 19:42:44 +01:00
parent bb2401d614
commit c6ec79c524
2 changed files with 3 additions and 2 deletions

View File

@@ -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.

View File

@@ -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 {