Fixed lint & fmt

This commit is contained in:
kolaente 2018-09-20 07:31:36 +02:00
parent 0f60c607ee
commit 8d27daccc6
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -5,15 +5,16 @@ import (
"os"
)
// Log is the handler for the logger
var Log = logging.MustGetLogger("vikunja")
var format = logging.MustStringFormatter(
`%{color}%{time:15:04:05.000} %{shortfunc} ▶ %{level:.4s} %{id:03x}%{color:reset} %{message}`,
)
// InitLogger initializes the global log handler
func InitLogger() {
backend := logging.NewLogBackend(os.Stderr, "", 0)
backendFormatter := logging.NewBackendFormatter(backend, format)
logging.SetBackend(backendFormatter)
}