Documentation
¶
Overview ¶
Package logging @Author Clover @Data 2024/7/18 上午10:24:00 @Desc 日志输出
Index ¶
- Variables
- func Close()
- func Debug(msg string, fields map[string]interface{})
- func Error(msg string, fields ...map[string]interface{})
- func ErrorWithErr(err error, msg string, fields ...map[string]interface{})
- func Fatal(msg string, exitCode int, fields ...map[string]interface{})
- func Info(msg string, fields ...map[string]interface{})
- func MonitorLogSize(maxLogsize int64)
- func Warn(msg string, fields ...map[string]interface{})
- func WarnWithErr(err error, msg string, fields ...map[string]interface{})
- type LogBuffer
- type LogEntry
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = NewLogBuffer()
Logger 定义一个全局的 LogBuffer
Functions ¶
func ErrorWithErr ¶
func MonitorLogSize ¶
func MonitorLogSize(maxLogsize int64)
MonitorLogSize checks the log file size and truncates it if it eceeds the max size.
func WarnWithErr ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.