Versions in this module Expand all Collapse all v0 v0.1.2 Oct 30, 2025 Changes in this version type Option + func WithResourceAttributes(attrs ...attribute.KeyValue) Option v0.1.1 Oct 28, 2025 Changes in this version + func Debug(ctx context.Context, msg string, fields ...any) + func DebugMap(ctx context.Context, msg string, fields map[string]any) + func Error(ctx context.Context, msg string, fields ...any) + func ErrorMap(ctx context.Context, msg string, fields map[string]any) + func Fatal(ctx context.Context, msg string, fields ...any) + func FatalMap(ctx context.Context, msg string, fields map[string]any) + func Info(ctx context.Context, msg string, fields ...any) + func InfoMap(ctx context.Context, msg string, fields map[string]any) + func Init(opts ...Option) error + func SetDefault(l Logger) + func Sync() error + func Warn(ctx context.Context, msg string, fields ...any) + func WarnMap(ctx context.Context, msg string, fields map[string]any) + type FileOption func(*OutputConfig) + func WithFileCompress() FileOption + func WithFileMaxAge(days int) FileOption + func WithFileMaxBackups(count int) FileOption + func WithFileMaxSize(size int) FileOption + type Format string + const ConsoleFormat + const JSONFormat + type Level int8 + const DebugLevel + const ErrorLevel + const FatalLevel + const InfoLevel + const WarnLevel + func ParseLevel(s string) Level + func (l Level) String() string + type Logger interface + Debug func(ctx context.Context, msg string, fields ...any) + DebugMap func(ctx context.Context, msg string, fields map[string]any) + Error func(ctx context.Context, msg string, fields ...any) + ErrorMap func(ctx context.Context, msg string, fields map[string]any) + Fatal func(ctx context.Context, msg string, fields ...any) + FatalMap func(ctx context.Context, msg string, fields map[string]any) + Info func(ctx context.Context, msg string, fields ...any) + InfoMap func(ctx context.Context, msg string, fields map[string]any) + Sync func() error + Warn func(ctx context.Context, msg string, fields ...any) + WarnMap func(ctx context.Context, msg string, fields map[string]any) + With func(fields ...any) Logger + func Default() Logger + func New(opts ...Option) (Logger, error) + func With(fields ...any) Logger + type OTLPOption func(*OutputConfig) + func WithOTLPHeaders(headers map[string]string) OTLPOption + func WithOTLPInsecure() OTLPOption + func WithOTLPTimeout(timeout time.Duration) OTLPOption + type Option func(*options) + func WithCaller(enabled bool) Option + func WithDevelopment() Option + func WithFile(path string, opts ...FileOption) Option + func WithFormat(format Format) Option + func WithLevel(level Level) Option + func WithOTLP(endpoint string, opts ...OTLPOption) Option + func WithStacktrace(enabled bool) Option + func WithStdout() Option + func WithTrace(serviceName string) Option + type Output struct + Config OutputConfig + Type OutputType + type OutputConfig struct + Compress bool + Endpoint string + FilePath string + Headers map[string]string + Insecure bool + MaxAge int + MaxBackups int + MaxSize int + Timeout time.Duration + type OutputType string + const FileOutput + const OTLPOutput + const StdoutOutput