Documentation
¶
Index ¶
- func Debug(msg string, args ...any)
- func Error(msg string, args ...any)
- func Info(msg string, args ...any)
- func Init(level slog.Level)
- func Warn(msg string, args ...any)
- type Logger
- func (l *Logger) Command(cmd string, args []string, duration int64)
- func (l *Logger) Database(operation string, duration int64, err error)
- func (l *Logger) Filter(name string, input, output, saved int)
- func (l *Logger) RateLimit(clientIP string, allowed bool)
- func (l *Logger) Validation(field string, value any, valid bool, reason string)
- func (l *Logger) WithContext(ctx context.Context) *Logger
- func (l *Logger) WithError(err error) *Logger
- func (l *Logger) WithFields(fields map[string]any) *Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
Logger wraps slog with structured logging
func (*Logger) Validation ¶
Validation logs validation events
func (*Logger) WithContext ¶
WithContext adds context fields
Click to show internal directories.
Click to hide internal directories.