diff --git a/init/init.go b/init/init.go index 06a05d0..40c20e3 100644 --- a/init/init.go +++ b/init/init.go @@ -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) } diff --git a/main.go b/main.go index 34c1191..d21dd97 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,7 @@ import ( func main() { r := httprouter.New() - web.Init(r, "") + web.Init(r, "", true) err := http.ListenAndServe(":8081", r)