summaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-06-20 00:25:23 -0400
committerUnknown <joe2010xtmf@163.com>2014-06-20 00:25:23 -0400
commit6c8d630bef3a58860237856c648e56f4b9cea97d (patch)
treed1e10401573ddf63787e45642a3cb72dfb324351 /modules/setting
parentf147ad619a68440ef6c30d797a8217e687e8d51d (diff)
downloadgitea-6c8d630bef3a58860237856c648e56f4b9cea97d.tar.gz
gitea-6c8d630bef3a58860237856c648e56f4b9cea97d.zip
Add database log adapter
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 73ec8ddd1b..93e02210cc 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -255,20 +255,20 @@ func newLogService() {
Cfg.MustBool(modeSec, "DAILY_ROTATE", true),
Cfg.MustInt(modeSec, "MAX_DAYS", 7))
case "conn":
- LogConfigs[i] = fmt.Sprintf(`{"level":"%s","reconnectOnMsg":%v,"reconnect":%v,"net":"%s","addr":"%s"}`, level,
+ LogConfigs[i] = fmt.Sprintf(`{"level":%s,"reconnectOnMsg":%v,"reconnect":%v,"net":"%s","addr":"%s"}`, level,
Cfg.MustBool(modeSec, "RECONNECT_ON_MSG"),
Cfg.MustBool(modeSec, "RECONNECT"),
Cfg.MustValueRange(modeSec, "PROTOCOL", "tcp", []string{"tcp", "unix", "udp"}),
Cfg.MustValue(modeSec, "ADDR", ":7020"))
case "smtp":
- LogConfigs[i] = fmt.Sprintf(`{"level":"%s","username":"%s","password":"%s","host":"%s","sendTos":"%s","subject":"%s"}`, level,
+ LogConfigs[i] = fmt.Sprintf(`{"level":%s,"username":"%s","password":"%s","host":"%s","sendTos":"%s","subject":"%s"}`, level,
Cfg.MustValue(modeSec, "USER", "example@example.com"),
Cfg.MustValue(modeSec, "PASSWD", "******"),
Cfg.MustValue(modeSec, "HOST", "127.0.0.1:25"),
Cfg.MustValue(modeSec, "RECEIVERS", "[]"),
Cfg.MustValue(modeSec, "SUBJECT", "Diagnostic message from serve"))
case "database":
- LogConfigs[i] = fmt.Sprintf(`{"level":"%s","driver":"%s","conn":"%s"}`, level,
+ LogConfigs[i] = fmt.Sprintf(`{"level":%s,"driver":"%s","conn":"%s"}`, level,
Cfg.MustValue(modeSec, "DRIVER"),
Cfg.MustValue(modeSec, "CONN"))
}