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>