Documentation
¶
Index ¶
- type Logger
- func (l *Logger) Close() error
- func (l *Logger) Debug(msg string, args ...any)
- func (l *Logger) DebugContext(ctx context.Context, msg string, args ...any)
- func (l *Logger) Error(msg string, args ...any)
- func (l *Logger) ErrorContext(ctx context.Context, msg string, args ...any)
- func (l *Logger) Handler() slog.Handler
- func (l *Logger) Info(msg string, args ...any)
- func (l *Logger) InfoContext(ctx context.Context, msg string, args ...any)
- func (l *Logger) Named(name string) *Logger
- func (l *Logger) Reopen() error
- func (l *Logger) Warn(msg string, args ...any)
- func (l *Logger) WarnContext(ctx context.Context, msg string, args ...any)
- func (l *Logger) With(args ...any) flog.StructuredLogger
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) DebugContext ¶
func (*Logger) ErrorContext ¶
func (*Logger) InfoContext ¶
func (*Logger) WarnContext ¶
type Option ¶
type Option func(*Logger)
func WithAttributes ¶
WithAttributes allows to set custom attributes on the logger creation.
func WithOnError ¶
WithOnError allows to set a function that is called when an error is logged.
Click to show internal directories.
Click to hide internal directories.