Fixed lint & fmt
This commit is contained in:
parent
0f60c607ee
commit
8d27daccc6
1 changed files with 2 additions and 1 deletions
|
@ -5,15 +5,16 @@ import (
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Log is the handler for the logger
|
||||||
var Log = logging.MustGetLogger("vikunja")
|
var Log = logging.MustGetLogger("vikunja")
|
||||||
|
|
||||||
var format = logging.MustStringFormatter(
|
var format = logging.MustStringFormatter(
|
||||||
`%{color}%{time:15:04:05.000} %{shortfunc} ▶ %{level:.4s} %{id:03x}%{color:reset} %{message}`,
|
`%{color}%{time:15:04:05.000} %{shortfunc} ▶ %{level:.4s} %{id:03x}%{color:reset} %{message}`,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// InitLogger initializes the global log handler
|
||||||
func InitLogger() {
|
func InitLogger() {
|
||||||
backend := logging.NewLogBackend(os.Stderr, "", 0)
|
backend := logging.NewLogBackend(os.Stderr, "", 0)
|
||||||
backendFormatter := logging.NewBackendFormatter(backend, format)
|
backendFormatter := logging.NewBackendFormatter(backend, format)
|
||||||
logging.SetBackend(backendFormatter)
|
logging.SetBackend(backendFormatter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue