Added log start flags

- Added log rotate function (experimental)
- Added disable log function #802
- Added log compression for rotated file (experimental)
This commit is contained in:
Toby Chui
2025-09-06 00:44:54 +08:00
parent c3afdefe45
commit 14bef4ef98
6 changed files with 166 additions and 21 deletions

View File

@@ -384,6 +384,7 @@ func initAPIs(targetMux *http.ServeMux) {
authRouter.HandleFunc("/api/log/read", LogViewer.HandleReadLog)
authRouter.HandleFunc("/api/log/summary", LogViewer.HandleReadLogSummary)
authRouter.HandleFunc("/api/log/errors", LogViewer.HandleLogErrorSummary)
authRouter.HandleFunc("/api/log/rotate/debug.trigger", SystemWideLogger.HandleDebugTriggerLogRotation)
//Debug
authRouter.HandleFunc("/api/info/pprof", pprof.Index)
}