use logger instead of fmt.Println
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
kolaente 2019-01-23 15:37:20 +01:00
parent ce8ae08d4f
commit 2c615774b4
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 4 additions and 3 deletions

View File

@ -22,10 +22,10 @@ import (
"time"
)
// LogErrFmt holds the format for all the console logging
// ErrFmt holds the format for all the console logging
const ErrFmt = `${time_rfc3339_nano}: ${level} ` + "\t" + `▶ ${prefix} ${short_file}:${line}`
// LogWebFmt holds the format for all logging related to web requests
// WebFmt holds the format for all logging related to web requests
const WebFmt = `${time_rfc3339_nano}: WEB ` + "\t" + `▶ ${remote_ip} ${id} ${method} ${status} ${uri} ${latency_human} - ${user_agent}`
// Fmt is the general log format

View File

@ -17,6 +17,7 @@
package models
import (
"code.vikunja.io/api/pkg/log"
"encoding/gob"
"fmt"
_ "github.com/go-sql-driver/mysql" // Because.
@ -111,7 +112,7 @@ func SetEngine() (err error) {
gob.Register(tablesWithPointer) // Need to register tables with pointer as well...
break
default:
fmt.Println("Did not find a valid cache type. Caching disabled. Please refer to the docs for poosible cache types.")
log.Log.Info("Did not find a valid cache type. Caching disabled. Please refer to the docs for poosible cache types.")
}
}