]> source.dussan.org Git - gitea.git/commitdiff
rotate unusual logs and stop stacktracing (#6935)
authorzeripath <art27@cantab.net>
Tue, 14 May 2019 00:08:34 +0000 (01:08 +0100)
committerLauris BH <lauris@nix.lv>
Tue, 14 May 2019 00:08:34 +0000 (03:08 +0300)
modules/log/log.go

index c0fd1179677af23bb81721866eed35c93b6a023f..d18996d48d31d8b6ffb06ba72c7a7649721d267c 100644 (file)
@@ -82,7 +82,7 @@ func NewGitLogger(logPath string) {
        }
 
        GitLogger = newLogger("git", 0)
-       GitLogger.SetLogger("file", "file", fmt.Sprintf(`{"level":"TRACE","filename":"%s","rotate":false}`, logPath))
+       GitLogger.SetLogger("file", "file", fmt.Sprintf(`{"level":"TRACE","filename":"%s","rotate":true,"maxsize":%d,"daily":true,"maxdays":7,"compress":true,"compressionLevel":-1, "stacktraceLevel":"NONE"}`, logPath, 1<<28))
 }
 
 // GetLevel returns the minimum logger level