aboutsummaryrefslogtreecommitdiff
path: root/modules/base
diff options
context:
space:
mode:
Diffstat (limited to 'modules/base')
-rw-r--r--modules/base/conf.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/base/conf.go b/modules/base/conf.go
index 6610bce1..9f6de56b 100644
--- a/modules/base/conf.go
+++ b/modules/base/conf.go
@@ -10,6 +10,7 @@ import (
"os/exec"
"path"
"path/filepath"
+ "strings"
"github.com/Unknwon/com"
"github.com/Unknwon/goconfig"
@@ -63,9 +64,10 @@ func newLogService() {
}
// Log level.
- level, ok := logLevels[Cfg.MustValue("log."+mode, "LEVEL", "Trace")]
+ levelName := Cfg.MustValue("log."+mode, "LEVEL", "Trace")
+ level, ok := logLevels[levelName]
if !ok {
- fmt.Printf("Unknown log level: %s\n", Cfg.MustValue("log."+mode, "LEVEL", "Trace"))
+ fmt.Printf("Unknown log level: %s\n", levelName)
os.Exit(2)
}
@@ -99,6 +101,7 @@ func newLogService() {
}
log.NewLogger(Cfg.MustInt64("log", "BUFFER_LEN", 10000), mode, config)
+ log.Info("Log Mode: %s(%s)", strings.Title(mode), levelName)
}
func newMailService() {