Versions in this module Expand all Collapse all v1 v1.0.0 Jul 24, 2026 Changes in this version + func ErrorPkg(msg string) + func InfoPkg(msg string) + func SetDefault(l Logger) + func WithContext(ctx context.Context, l Logger) context.Context + type Context struct + func (c *Context) Any(key string, val any) *Context + func (c *Context) Bool(key string, val bool) *Context + func (c *Context) Dur(key string, d time.Duration) *Context + func (c *Context) Err(err error) *Context + func (c *Context) Float64(key string, val float64) *Context + func (c *Context) Int(key string, val int) *Context + func (c *Context) Int64(key string, val int64) *Context + func (c *Context) Logger() Logger + func (c *Context) Str(key, val string) *Context + func (c *Context) Stringer(key string, val fmt.Stringer) *Context + type ContextExtractor func(ctx context.Context, e *Event) + type Entry interface + Caller func() string + Level func() Level + Message func() string + Stack func() string + Time func() time.Time + type Event struct + func (e *Event) Any(key string, val any) *Event + func (e *Event) Bool(key string, val bool) *Event + func (e *Event) Ctx(ctx context.Context) *Event + func (e *Event) Dur(key string, d time.Duration) *Event + func (e *Event) Err(err error) *Event + func (e *Event) Float64(key string, val float64) *Event + func (e *Event) Int(key string, val int) *Event + func (e *Event) Int64(key string, val int64) *Event + func (e *Event) Msg(msg string) + func (e *Event) Msgf(format string, args ...any) + func (e *Event) Str(key, val string) *Event + func (e *Event) Stringer(key string, val fmt.Stringer) *Event + type Format int + const JSONFormat + const TextFormat + type Hook interface + Fire func(Entry) error + type Level int32 + const DebugLevel + const ErrorLevel + const FatalLevel + const InfoLevel + const WarnLevel + func (l Level) String() string + type Logger interface + Close func() error + Debug func() *Event + Enabled func(lvl Level) bool + Error func() *Event + Fatal func() *Event + Info func() *Event + Level func() Level + Panic func() *Event + SetLevel func(lvl Level) + Sync func() error + Warn func() *Event + With func() *Context + func Default() Logger + func FromContext(ctx context.Context) Logger + func New(opts ...Option) Logger + type Option func(*logger) + func WithCaller(enabled bool) Option + func WithColor(enabled bool) Option + func WithConcurrentWriter() Option + func WithContextExtractor(fn ContextExtractor) Option + func WithFormat(f Format) Option + func WithHook(h Hook) Option + func WithLevel(lvl Level) Option + func WithName(name string) Option + func WithOutput(w io.Writer) Option + func WithSampler(s Sampler) Option + func WithStackTrace(minLevel Level) Option + func WithTimeFunc(fn func() time.Time) Option + type Sampler interface + Allow func(Entry) bool