Documentation ¶
Index ¶
- func ContextWithNewID(ctx context.Context) context.Context
- func Debug(args ...any)
- func DebugContext(ctx context.Context, args ...any)
- func Error(args ...any)
- func ErrorContext(ctx context.Context, args ...any)
- func Fatal(args ...any)
- func FatalContext(ctx context.Context, args ...any)
- func FormatLevel(level Level) string
- func Info(args ...any)
- func InfoContext(ctx context.Context, args ...any)
- func Panic(args ...any)
- func PanicContext(ctx context.Context, args ...any)
- func SetDefault(logger Logger)
- func Trace(args ...any)
- func TraceContext(ctx context.Context, args ...any)
- func Warn(args ...any)
- func WarnContext(ctx context.Context, args ...any)
- type ContextID
- type DefaultOptions
- type Level
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugContext ¶
func ErrorContext ¶
func FatalContext ¶
func FormatLevel ¶
func InfoContext ¶
func PanicContext ¶
func SetDefault ¶
func SetDefault(logger Logger)
func TraceContext ¶
func WarnContext ¶
Types ¶
type DefaultOptions ¶
type Logger ¶
type Logger interface { WithPrefix(prefix string) Logger WithLevel(level Level) Logger Trace(args ...any) Debug(args ...any) Info(args ...any) Warn(args ...any) Error(args ...any) Fatal(args ...any) Panic(args ...any) TraceContext(ctx context.Context, args ...any) DebugContext(ctx context.Context, args ...any) InfoContext(ctx context.Context, args ...any) WarnContext(ctx context.Context, args ...any) ErrorContext(ctx context.Context, args ...any) FatalContext(ctx context.Context, args ...any) PanicContext(ctx context.Context, args ...any) }
func NewDefault ¶
func NewDefault(options DefaultOptions) Logger
Click to show internal directories.
Click to hide internal directories.