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:
parent
8d9e6a2c62
commit
04220ca1e7
1 changed files with 1 additions and 2 deletions
|
@ -7,7 +7,6 @@ package logger // import "miniflux.app/logger"
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var requestedLevel = InfoLevel
|
var requestedLevel = InfoLevel
|
||||||
|
@ -80,6 +79,6 @@ func Fatal(format string, v ...interface{}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func formatMessage(level LogLevel, 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...)
|
fmt.Fprintf(os.Stderr, prefix+format+"\n", v...)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue