Versions in this module Expand all Collapse all v0 v0.2.0 Nov 17, 2026 Changes in this version + const CollectionDAU + const CollectionLogs + const DefaultBatchSize + const DefaultBufferSize + const DefaultFlushInterval + const DefaultRetentionDays + const FieldEvent + const FieldRoute + const FieldStatus + const FieldUserID + const Redacted + var DefaultRedactKeys = []string + func Event(ctx context.Context, log *slog.Logger, name string, attrs ...slog.Attr) + func WithScope(ctx context.Context) context.Context type Config + LogToMongo bool + Mongo MongoConfig + RedactKeys []string + type Inserter interface + Close func(ctx context.Context) error + Insert func(ctx context.Context, collection string, docs []any) error + type MongoConfig struct + BatchSize int + BufferSize int + Database string + FlushMs int + RetentionDays int + URI string + type Option func(*settings) + func WithInserter(i Inserter) Option + func WithMeta(environment, version string) Option v0.1.0 Nov 14, 2026 Changes in this version + const LevelDebug + const LevelError + const LevelInfo + const LevelVerbose + const LevelWarn + func AttrsFrom(ctx context.Context) []slog.Attr + func Err(err error) slog.Attr + func Fanout(hs ...slog.Handler) slog.Handler + func LevelName(l slog.Level) string + func NewConsoleHandler(w io.Writer, app string, min slog.Leveler, color bool) slog.Handler + func NewContextHandler(next slog.Handler) slog.Handler + func NewJSONHandler(w io.Writer, app string, min slog.Leveler) slog.Handler + func ParseLevel(s string) (slog.Level, error) + func WithAttrs(ctx context.Context, attrs ...slog.Attr) context.Context + type Config struct + ConsoleColor *bool + LogDirectory string + LogToConsole bool + LogToFile bool + MaxFiles int + MinimumLogLevel string + ZippedArchive bool + func DefaultConfig() Config + type DailyFile struct + func NewDailyFile(o DailyFileOptions) (*DailyFile, error) + func (d *DailyFile) Close() error + func (d *DailyFile) Write(p []byte) (int, error) + type DailyFileOptions struct + Compress bool + Dir string + MaxFiles int + Now func() time.Time + Pattern string + Symlink string + type Logger struct + func New(cfg Config, app string) (*Logger, error) + func (l *Logger) Close() error + func (l *Logger) Verbose(msg string, args ...any) + func (l *Logger) VerboseContext(ctx context.Context, msg string, args ...any)