Documentation ¶
Index ¶
- Constants
- func Debug(msg interface{})
- func DebugF(format string, a ...any)
- func Error(msg interface{})
- func ErrorF(format string, a ...any)
- func Fatal(msg interface{})
- func FatalF(format string, a ...any)
- func Info(msg interface{})
- func InfoF(format string, a ...any)
- func NewFileRotationWriter(dir string, name string, maxBackups int, maxSize int, maxAge int) (w io.Writer, err error)
- func Panic(msg interface{})
- func PanicF(format string, a ...any)
- func SetDefaultLogger(logger *Logger)
- func Trace(msg interface{})
- func TraceF(format string, a ...any)
- func Warn(msg interface{})
- func WarnF(format string, a ...any)
- type Logger
- func (l *Logger) AddConsoleWriter() (err error)
- func (l *Logger) AddFileRotationWriter(dir string, name string, maxBackups int, maxSize int, maxAge int) (err error)
- func (l *Logger) AddFileWriter(dest string) (err error)
- func (l *Logger) Debug(msg interface{})
- func (l *Logger) DebugF(format string, a ...any)
- func (l *Logger) Error(msg interface{})
- func (l *Logger) ErrorF(format string, a ...any)
- func (l *Logger) Fatal(msg interface{})
- func (l *Logger) FatalF(format string, a ...any)
- func (l *Logger) GetLevelWriter() io.Writer
- func (l *Logger) Info(msg interface{})
- func (l *Logger) InfoF(format string, a ...any)
- func (l *Logger) Init(force bool) *Logger
- func (l *Logger) Panic(msg interface{})
- func (l *Logger) PanicF(format string, a ...any)
- func (l *Logger) SetLevel(level int) (err error)
- func (l *Logger) SetTimeFormat(format string) (err error)
- func (l *Logger) Trace(msg interface{})
- func (l *Logger) TraceF(format string, a ...any)
- func (l *Logger) Warn(msg interface{})
- func (l *Logger) WarnF(format string, a ...any)
Constants ¶
View Source
const ( LogLevelTrace = iota LogLevelDebug LogLevelInfo LogLevelWarn LogLevelError LogLevelFatal LogLevelPanic )
Variables ¶
This section is empty.
Functions ¶
func NewFileRotationWriter ¶
func SetDefaultLogger ¶
func SetDefaultLogger(logger *Logger)
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) AddConsoleWriter ¶
func (*Logger) AddFileRotationWriter ¶
func (*Logger) AddFileWriter ¶
func (*Logger) GetLevelWriter ¶
func (*Logger) SetTimeFormat ¶
Click to show internal directories.
Click to hide internal directories.