Versions in this module Expand all Collapse all v0 v0.0.5 Sep 28, 2025 Changes in this version + type LogConfig struct + FilePath string + LogLevel int + MaxAgeDays int + MaxBackups int + MaxSizeMB int v0.0.1 Aug 6, 2025 Changes in this version + func Debug(args ...interface{}) + func Debugf(format string, args ...interface{}) + func Error(args ...interface{}) + func Errorf(format string, args ...interface{}) + func Fatal(args ...interface{}) + func Fatalf(format string, args ...interface{}) + func Info(args ...interface{}) + func Infof(format string, args ...interface{}) + func InitGlobalLogger(c logger) (io.Closer, error) + func SetFormatter(formatter Formatter) + func SetLevel(level Level) + func SetOutput(out io.Writer) + func Warn(args ...interface{}) + func Warnf(format string, args ...interface{}) + type Entry struct + Fields Fields + File string + Func string + Level Level + Line int + Logger *Logger + Message string + Time time.Time + func WithFields(fields Fields) *Entry + func (e *Entry) WithFields(fields Fields) *Entry + type Fields map[string]interface + type Formatter interface + Format func(*Entry) ([]byte, error) + type JSONFormatter struct + func (f *JSONFormatter) Format(e *Entry) ([]byte, error) + type Level uint8 + const DebugLevel + const ErrorLevel + const FatalLevel + const InfoLevel + const WarnLevel + func (l Level) String() string + type LogRotator struct + func NewRotator(filename string, maxSize int64, maxBackups int) (*LogRotator, error) + func (r *LogRotator) Close() error + func (r *LogRotator) Write(p []byte) (n int, err error) + type Logger struct + func New(opts ...Option) *Logger + func (l *Logger) Debug(args ...interface{}) + func (l *Logger) Debugf(format string, args ...interface{}) + func (l *Logger) Error(args ...interface{}) + func (l *Logger) Errorf(format string, args ...interface{}) + func (l *Logger) Fatal(args ...interface{}) + func (l *Logger) Fatalf(format string, args ...interface{}) + func (l *Logger) Info(args ...interface{}) + func (l *Logger) Infof(format string, args ...interface{}) + func (l *Logger) Warn(args ...interface{}) + func (l *Logger) Warnf(format string, args ...interface{}) + func (l *Logger) WithFields(fields Fields) *Entry + type Option func(*Logger) + func WithFormatter(formatter Formatter) Option + func WithLevel(level Level) Option + func WithOutput(out io.Writer) Option + type TextFormatter struct + func (f *TextFormatter) Format(e *Entry) ([]byte, error)