Versions in this module Expand all Collapse all v0 v0.3.0 Nov 21, 2023 Changes in this version + const LevelBuss + const LevelDebug + const LevelError + const LevelFatal + const LevelInfo + const LevelTrace + const LevelWarn + const Lfile + const Llevel + const Ltime + const RollTypeDay + const TimeFormat + const WhenDay + const WhenHour + const WhenMinute + const WhenSecond + var LevelName [7]string = [7]string + var LogLevelString = map[string]int + var TimePrefix = &struct{} + func Buss(format string, v ...interface{}) + func Close() + func DLOG(fileName string, format string, v ...interface{}) + func Debug(format string, v ...interface{}) + func DebugE(format string, v ...interface{}) error + func DebugX(delta int, format string, v ...interface{}) + func Error(format string, v ...interface{}) + func ErrorE(format string, v ...interface{}) error + func ErrorX(delta int, format string, v ...interface{}) + func Fatal(format string, v ...interface{}) + func FatalE(format string, v ...interface{}) error + func FatalX(delta int, format string, v ...interface{}) + func GetLevel() int + func Info(format string, v ...interface{}) + func InfoE(format string, v ...interface{}) error + func InfoX(delta int, format string, v ...interface{}) + func SetLevel(level int) + func SetLevelS(level string) + func TimeLogClose() + func TimeLogInit(logDir string) error + func Trace(format string, v ...interface{}) + func TraceE(format string, v ...interface{}) error + func TraceX(delta int, format string, v ...interface{}) + func Warn(format string, v ...interface{}) + func WarnE(format string, v ...interface{}) error + func WarnX(delta int, format string, v ...interface{}) + type FileHandler struct + func NewFileHandler(fileName string, flag int) (*FileHandler, error) + func (h *FileHandler) Close() error + func (h *FileHandler) Write(b []byte) (n int, err error) + type Handler interface + Close func() error + Write func(p []byte) (n int, err error) + type Logger struct + func GetLogger(name string) *Logger + func New(handler Handler, flag int) *Logger + func NewDefault(handler Handler) *Logger + func StdLogger() *Logger + func (l *Logger) Buss(format string, v ...interface{}) + func (l *Logger) Close() + func (l *Logger) Debug(format string, v ...interface{}) + func (l *Logger) Error(format string, v ...interface{}) + func (l *Logger) Fatal(format string, v ...interface{}) + func (l *Logger) Info(format string, v ...interface{}) + func (l *Logger) Level() int + func (l *Logger) Output(callDepth int, level int, format string, v ...interface{}) + func (l *Logger) SetHandler(h Handler) + func (l *Logger) SetLevel(level int) + func (l *Logger) Trace(format string, v ...interface{}) + func (l *Logger) Warn(format string, v ...interface{}) + type NullHandler struct + func NewNullHandler() (*NullHandler, error) + func (h *NullHandler) Close() error + func (h *NullHandler) Write(b []byte) (n int, err error) + type RotatingFileHandler struct + func NewRotatingFileHandler(fileName string, maxBytes int, backupCount int) (*RotatingFileHandler, error) + func (h *RotatingFileHandler) Close() error + func (h *RotatingFileHandler) Write(p []byte) (n int, err error) + type SocketHandler struct + func NewSocketHandler(protocol string, addr string) (*SocketHandler, error) + func (h *SocketHandler) Close() error + func (h *SocketHandler) Write(p []byte) (n int, err error) + type StreamHandler struct + func NewStreamHandler(w io.Writer) (*StreamHandler, error) + func (h *StreamHandler) Close() error + func (h *StreamHandler) Write(b []byte) (n int, err error) + type TimeRollFile struct + func NewTimeRollFile(fileName string, fileDir string, rollTimeType int) *TimeRollFile + func (self *TimeRollFile) Close() + func (self *TimeRollFile) Write(logTime int64, content []byte) error + func (self *TimeRollFile) WriteString(logTime int64, content string) error + type TimeRotatingFileHandler struct + func NewTimeRotatingFileHandler(baseName string, when int8, interval int) (*TimeRotatingFileHandler, error) + func (h *TimeRotatingFileHandler) Close() error + func (h *TimeRotatingFileHandler) Write(b []byte) (n int, err error)