diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-11 14:37:12 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-11 14:37:12 -0400 |
commit | 0970d6cc38a79c57ffe8e3c85687f7c7c49059be (patch) | |
tree | e38c3237ff5add6b624115ec8a7595fe32abfde4 /routers/admin/admin.go | |
parent | 98eeec4cbb6967b0e12181f79f2ffc3db00933f8 (diff) | |
download | gitea-0970d6cc38a79c57ffe8e3c85687f7c7c49059be.tar.gz gitea-0970d6cc38a79c57ffe8e3c85687f7c7c49059be.zip |
Log to different adapter according to level
Diffstat (limited to 'routers/admin/admin.go')
-rw-r--r-- | routers/admin/admin.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go index dbd5e94594..f9c11f8378 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -211,8 +211,14 @@ func Config(ctx *middleware.Context) { ctx.Data["PictureService"] = base.PictureService ctx.Data["DisableGravatar"] = base.DisableGravatar - ctx.Data["LogMode"] = base.LogMode - ctx.Data["LogConfig"] = base.LogConfig + type logger struct { + Mode, Config string + } + loggers := make([]*logger, len(base.LogModes)) + for i := range base.LogModes { + loggers[i] = &logger{base.LogModes[i], base.LogConfigs[i]} + } + ctx.Data["Loggers"] = loggers ctx.HTML(200, "admin/config") } |