feat: add server log file management to performance settings
Add API endpoints (GET/DELETE /api/performance/logs) to list and clean up server log files by count or by age. Track the active log file path in the logger to prevent deleting the currently open log. Add a management UI section in the performance settings page with log directory info, file statistics, and cleanup controls. Includes i18n translations for all supported languages (en, fr, ja, ru, vi, zh-CN, zh-TW).
This commit is contained in:
@@ -194,6 +194,8 @@ func SetApiRouter(router *gin.Engine) {
|
||||
performanceRoute.DELETE("/disk_cache", controller.ClearDiskCache)
|
||||
performanceRoute.POST("/reset_stats", controller.ResetPerformanceStats)
|
||||
performanceRoute.POST("/gc", controller.ForceGC)
|
||||
performanceRoute.GET("/logs", controller.GetLogFiles)
|
||||
performanceRoute.DELETE("/logs", controller.CleanupLogFiles)
|
||||
}
|
||||
ratioSyncRoute := apiRouter.Group("/ratio_sync")
|
||||
ratioSyncRoute.Use(middleware.RootAuth())
|
||||
|
||||
Reference in New Issue
Block a user