set log level at startup
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Init initializes the Pixeldrain Web UI controllers
|
// 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())
|
log.Info("Starting web UI server (PID %v)", os.Getpid())
|
||||||
|
|
||||||
var webconf = &conf.PixelWebConfig{}
|
var webconf = &conf.PixelWebConfig{}
|
||||||
@@ -27,7 +27,7 @@ func Init(r *httprouter.Router, prefix string) {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !webconf.DebugMode {
|
if !webconf.DebugMode && setLogLevel {
|
||||||
log.SetLogLevel(log.LevelInfo)
|
log.SetLogLevel(log.LevelInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user