set log level at startup

This commit is contained in:
Wim Brand
2018-08-15 10:11:31 +02:00
parent 7c800a6452
commit 6b46e1a0d8
2 changed files with 3 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ import (
)
// Init initializes the Pixeldrain Web UI controllers
func Init(r *httprouter.Router, prefix string) {
func Init(r *httprouter.Router, prefix string, setLogLevel bool) {
log.Info("Starting web UI server (PID %v)", os.Getpid())
var webconf = &conf.PixelWebConfig{}
@@ -27,7 +27,7 @@ func Init(r *httprouter.Router, prefix string) {
os.Exit(1)
}
if !webconf.DebugMode {
if !webconf.DebugMode && setLogLevel {
log.SetLogLevel(log.LevelInfo)
}