diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-03-02 01:01:52 +0800 |
---|---|---|
committer | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-03-02 01:01:52 +0800 |
commit | 7382c23a17cad73c137e9bca66be0cd1b04b75fd (patch) | |
tree | ec1eda9a202c9605a2cb5b92002c876672aa276d /internal/cmd/serv.go | |
parent | 0b86aa5d29478c2316f6f29eb5fdcfb074b459b6 (diff) |
cmd: init minimal logging config in hook mode
Diffstat (limited to 'internal/cmd/serv.go')
-rw-r--r-- | internal/cmd/serv.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/cmd/serv.go b/internal/cmd/serv.go index 0efb139b..3478b720 100644 --- a/internal/cmd/serv.go +++ b/internal/cmd/serv.go @@ -49,6 +49,8 @@ func fail(userMessage, logMessage string, args ...interface{}) { } func setup(c *cli.Context, logPath string, connectDB bool) { + conf.HookMode = true + var customConf string if c.IsSet("config") { customConf = c.String("config") @@ -60,6 +62,7 @@ func setup(c *cli.Context, logPath string, connectDB bool) { if err != nil { fail("Internal error", "Failed to init configuration: %v", err) } + conf.InitLogging(true) level := log.LevelTrace if conf.IsProdMode() { |