refactor(log): simplify access logger and disable stdout buffering

- Remove MultiWriter complexity and use single writer interface
  - Disable buffering for stdout logging to ensure immediate output
  - Replace slice-based closer/rotate support with type assertions
  - Simplify rotation result handling by passing result pointer
  - Update buffer size constants and improve memory management
  - Remove redundant stdout_logger.go and multi_writer.go files
  - Fix test cases to match new rotation API signature
This commit is contained in:
yusing
2025-10-11 19:14:59 +08:00
parent 848f26aa86
commit 92aa61e732
7 changed files with 100 additions and 194 deletions

View File

@@ -26,7 +26,7 @@ var (
openedFilesMu sync.Mutex
)
func newFileIO(path string) (SupportRotate, error) {
func newFileIO(path string) (WriterWithName, error) {
openedFilesMu.Lock()
defer openedFilesMu.Unlock()