diff options
Diffstat (limited to 'routers/private/manager.go')
-rw-r--r-- | routers/private/manager.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/routers/private/manager.go b/routers/private/manager.go index a3b9a16f79..e7f08ac455 100644 --- a/routers/private/manager.go +++ b/routers/private/manager.go @@ -8,6 +8,7 @@ import ( "fmt" "net/http" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/json" @@ -67,6 +68,12 @@ func ReleaseReopenLogging(ctx *context.PrivateContext) { ctx.PlainText(http.StatusOK, "success") } +// SetLogSQL re-sets database SQL logging +func SetLogSQL(ctx *context.PrivateContext) { + db.SetLogSQL(ctx, ctx.FormBool("on")) + ctx.PlainText(http.StatusOK, "success") +} + // RemoveLogger removes a logger func RemoveLogger(ctx *context.PrivateContext) { group := ctx.Params("group") |