1
0
Fork 0

Remove date and time from log messages

We assume that logs are sent to Syslog or similar.

Syslog or systemd already adds the timetamp.
This commit is contained in:
Frédéric Guillot 2018-12-01 18:24:01 -08:00
parent 8d9e6a2c62
commit 04220ca1e7

View file

@ -7,7 +7,6 @@ package logger // import "miniflux.app/logger"
import (
"fmt"
"os"
"time"
)
var requestedLevel = InfoLevel
@ -80,6 +79,6 @@ func Fatal(format string, v ...interface{}) {
}
func formatMessage(level LogLevel, format string, v ...interface{}) {
prefix := fmt.Sprintf("[%s] [%s] ", time.Now().Format("2006-01-02T15:04:05"), level.String())
prefix := fmt.Sprintf("[%s] ", level.String())
fmt.Fprintf(os.Stderr, prefix+format+"\n", v...)
}