Versions in this module Expand all Collapse all v1 v1.4.3 Aug 7, 2026 Changes in this version type Stats + RotationErrors uint64 v1.4.2 Aug 7, 2026 v1.4.1 Aug 7, 2026 v1.4.0 Aug 7, 2026 Changes in this version type Config + DurabilityTier DurabilityTier + FsyncEveryNCount int + SyncMode bool + type DurabilityTier uint8 + const Direct + const FsyncEveryN + const FsyncEveryWrite + const OSBuffered + func (d DurabilityTier) String() string type Entry + FieldsV []Field + type Field struct + Key string + Num uint64 + Str string + Type FieldType + func Bool(key string, val bool) Field + func Dur(key string, val time.Duration) Field + func Err(err error) Field + func ErrWithKey(key string, err error) Field + func Float64(key string, val float64) Field + func Int(key string, val int) Field + func Int64(key string, val int64) Field + func Str(key, val string) Field + func Uint64(key string, val uint64) Field + type FieldType uint8 + const BoolType + const DurationType + const ErrorType + const Float64Type + const Int64Type + const StringType + const Uint64Type type Logger + func (l *Logger) DebugFields(logType string, msg []byte, fields ...Field) + func (l *Logger) DebugFieldsString(logType string, msg string, fields ...Field) + func (l *Logger) ErrorFields(logType string, msg []byte, fields ...Field) + func (l *Logger) ErrorFieldsString(logType string, msg string, fields ...Field) + func (l *Logger) InfoFields(logType string, msg []byte, fields ...Field) + func (l *Logger) InfoFieldsString(logType string, msg string, fields ...Field) + func (l *Logger) LogFields(level Level, logType string, msg []byte, fields ...Field) + func (l *Logger) WarnFields(logType string, msg []byte, fields ...Field) + func (l *Logger) WarnFieldsString(logType string, msg string, fields ...Field) + type SlogHandler struct + func NewSlogHandler(l *Logger, logType string) *SlogHandler + func (h *SlogHandler) Enabled(ctx context.Context, level slog.Level) bool + func (h *SlogHandler) Handle(ctx context.Context, r slog.Record) error + func (h *SlogHandler) WithAttrs(attrs []slog.Attr) slog.Handler + func (h *SlogHandler) WithGroup(name string) slog.Handler type Stats + SyncWriteErrors uint64 v1.2.0 Aug 6, 2026 Changes in this version + type Stats struct + ChannelCap uint64 + ChannelSize uint64 + Drops uint64 v1.1.0 Jul 19, 2026 Changes in this version + const RequestIDKey + const SpanIDKey + const TraceIDKey type Logger + func (l *Logger) DebugCtx(ctx context.Context, logType string, msg string, fields ...string) + func (l *Logger) ErrorCtx(ctx context.Context, logType string, msg string, fields ...string) + func (l *Logger) InfoCtx(ctx context.Context, logType string, msg string, fields ...string) + func (l *Logger) SetOnDrop(fn func(dropped uint64)) + func (l *Logger) WarnCtx(ctx context.Context, logType string, msg string, fields ...string) v1.0.0 Jul 16, 2026 Changes in this version + type Config struct + ChannelSize int + FlushThreshold int + FlushTimeout time.Duration + IncludeCaller bool + JSONOutput bool + MaxBackupFiles int + MaxFileSize int64 + OutputFile string + RateLimitWindow int64 + WorkerBufferSize int + WriterBufferSize int + func DefaultConfig() Config + type Entry struct + Fields []string + File string + Level Level + Line int + Msg []byte + Profile *SubProfile + Ts int64 + Type string + func (e *Entry) Reset() + type Level uint8 + const LevelDebug + const LevelError + const LevelInfo + const LevelWarn + func (l Level) String() string + type Logger struct + func NewLogger(c Config) *Logger + func (l *Logger) AsWriter(level Level, logType string) io.Writer + func (l *Logger) Close() error + func (l *Logger) Debug(logType string, msg []byte, fields ...string) + func (l *Logger) DebugString(logType string, msg string, fields ...string) + func (l *Logger) Drops() uint64 + func (l *Logger) Error(logType string, msg []byte, fields ...string) + func (l *Logger) ErrorString(logType string, msg string, fields ...string) + func (l *Logger) Flush() + func (l *Logger) GetLevel() Level + func (l *Logger) Info(logType string, msg []byte, fields ...string) + func (l *Logger) InfoString(logType string, msg string, fields ...string) + func (l *Logger) Log(level Level, logType string, msg []byte, fields ...string) + func (l *Logger) RegisterSub(logType string, opts ...SubOption) + func (l *Logger) ResetDrops() + func (l *Logger) SetLevelValue(level Level) + func (l *Logger) Start(ctx context.Context) + func (l *Logger) StartWithWriter(ctx context.Context, w io.Writer) + func (l *Logger) Stats() map[string]uint64 + func (l *Logger) Warn(logType string, msg []byte, fields ...string) + func (l *Logger) WarnString(logType string, msg string, fields ...string) + type StdLogWriter struct + func (w *StdLogWriter) Write(p []byte) (int, error) + type SubOption func(*SubProfile) + func WithFields(fields ...string) SubOption + func WithRateLimit(limit int64, window time.Duration) SubOption + func WithSampleRate(rate int64) SubOption + type SubProfile struct + Name string