Versions in this module Expand all Collapse all v1 v1.0.2 Nov 21, 2025 v1.0.1 Oct 29, 2025 Changes in this version + const LevelKey + var DefaultCaller = Caller(2) + var DefaultLogger = NewLogger() + var DefaultTimestamp = TimestampFormat(time.Now(), time.RFC3339Nano) + var DefaultTimestampUTC = TimestampFormat(time.Now().UTC(), time.RFC3339Nano) + var ErrMissingValue = errors.New("(MISSING)") + func Caller(depth int) string + func Debug(a ...interface{}) + func Debugf(format string, a ...interface{}) + func Error(a ...interface{}) + func Errorf(format string, a ...interface{}) + func Fatal(a ...interface{}) + func Fatalf(format string, a ...interface{}) + func Info(a ...interface{}) + func Infof(format string, a ...interface{}) + func Merge(dst map[string]interface{}, k, v interface{}) + func NewContext(ctx context.Context, l *Helper) context.Context + func TimestampFormat(t time.Time, layout string) string + func Warn(a ...interface{}) + func Warnf(format string, a ...interface{}) + type Helper struct + func FromContext(ctx context.Context) *Helper + func NewHelper(log Logger) *Helper + func (h *Helper) Debug(a ...interface{}) + func (h *Helper) Debugf(format string, a ...interface{}) + func (h *Helper) Debugw(kv ...interface{}) + func (h *Helper) Error(a ...interface{}) + func (h *Helper) Errorf(format string, a ...interface{}) + func (h *Helper) Errorw(kv ...interface{}) + func (h *Helper) Fatal(a ...interface{}) + func (h *Helper) Fatalf(format string, a ...interface{}) + func (h *Helper) Fatalw(kv ...interface{}) + func (h *Helper) Info(a ...interface{}) + func (h *Helper) Infof(format string, a ...interface{}) + func (h *Helper) Infow(kv ...interface{}) + func (h *Helper) WithError(err error) *Helper + func (h *Helper) WithFields(fields map[string]interface{}) *Helper + type Level int8 + const LevelDebug + const LevelError + const LevelFatal + const LevelInfo + const LevelWarn + func ParseLevel(s string) Level + func (l Level) Enabled(lv Level) bool + func (l Level) String() string + type Logger interface + Fields func(fields map[string]interface{}) Logger + Log func(level Level, kvs ...interface{}) + func NewJSONLogger(opts ...Option) Logger + func NewLogger(opts ...Option) Logger + type Option func(*Options) + func WithCallerSkipCount(c int) Option + func WithLevel(level Level) Option + func WithOutput(out io.Writer) Option + type Options struct + CallerSkipCount int + Context ctx.Context + Fields map[string]interface{} + Level Level + Out io.Writer