Commit Graph

10 Commits

Author SHA1 Message Date
kingecg cdea9d86ed ```
feat(file): add thread safety and improve log rolling functionality

- Add sync.Mutex to FileAppender for thread-safe operations
- Implement proper mutex locking in start() goroutine to prevent
  race conditions during file operations
- Return boolean from checkAndRoll() method to indicate if rolling occurred
- Add MaxCount field to limit number of archived log files
- Implement cleanup of old log files exceeding MaxCount limit
- Add proper error handling for file rename operations
- Track current file size using WriteString return values

refactor(format): update formatting functions with better type safety

- Change isFormatString parameter

Co-authored-by: Copilot <copilot@github.com>
2026-07-09 21:47:03 +08:00
kingecg 1004333534 fix 2025-06-06 20:23:06 +08:00
kingecg 107b8f3050 add doc 2025-06-06 19:38:01 +08:00
程广 b5ea719c56 file appender添加滚动设置,appender添加formatter设置 2025-06-06 11:07:04 +08:00
程广 c8e7426d2d fix code 2025-06-06 09:57:25 +08:00
kingecg 45c66585ad fix support for format 2024-10-01 15:55:21 +08:00
kingecg d13d851819 add support for format 2024-10-01 13:47:50 +08:00
kingecg 4811fbbbe5 更新 format.go 2023-12-10 00:40:49 +08:00
kingecg 5b8be57c69 更新 format.go
log 信息添加category
2023-12-10 00:40:28 +08:00
程广 bde229321f refactor 2023-11-29 10:16:56 +08:00