fix(logging): refactor ConfigureLogOutput to accept config object and adjust log directory handling

This commit is contained in:
Luis Pater
2025-12-30 10:28:25 +08:00
parent 50e6d845f4
commit bc866bac49
3 changed files with 8 additions and 14 deletions

View File

@@ -856,7 +856,7 @@ func (s *Server) UpdateClients(cfg *config.Config) {
}
if oldCfg == nil || oldCfg.LoggingToFile != cfg.LoggingToFile || oldCfg.LogsMaxTotalSizeMB != cfg.LogsMaxTotalSizeMB {
if err := logging.ConfigureLogOutput(cfg.LoggingToFile, cfg.LogsMaxTotalSizeMB); err != nil {
if err := logging.ConfigureLogOutput(cfg); err != nil {
log.Errorf("failed to reconfigure log output: %v", err)
} else {
if oldCfg == nil {