From 04220ca1e7171e4adf1a858b9df87fe59f724f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Sat, 1 Dec 2018 18:24:01 -0800 Subject: [PATCH] Remove date and time from log messages We assume that logs are sent to Syslog or similar. Syslog or systemd already adds the timetamp. --- logger/logger.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/logger/logger.go b/logger/logger.go index 33a08e3e..a430c0de 100644 --- a/logger/logger.go +++ b/logger/logger.go @@ -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...) }