🎨 start v3

This commit is contained in:
zhaoyupeng
2025-11-24 09:56:15 +08:00
commit 9eb29011f3
8 changed files with 307 additions and 0 deletions

21
logger/new.go Normal file
View File

@@ -0,0 +1,21 @@
package logger
import (
"os"
"sync"
)
func New() *logger {
return &logger{
Mutex: sync.Mutex{},
timeFormat: "2006-01-02T15:04:05",
writer: os.Stdout,
level: LogLevelInfo,
debug: nilLogger,
info: normalLogger,
warn: normalLogger,
error: normalLogger,
panic: panicLogger,
fatal: fatalLogger,
}
}