Documentation
¶
Overview ¶
Package log provides a high-performance, non-blocking logger for userspace networking
Index ¶
- type Level
- type Logger
- func (l *Logger) Debug(format string)
- func (l *Logger) Debug1(format string, arg1 any)
- func (l *Logger) Debug2(format string, arg1, arg2 any)
- func (l *Logger) Debug3(format string, arg1, arg2, arg3 any)
- func (l *Logger) Debugf(format string, args ...any)
- func (l *Logger) Enabled(level Level) bool
- func (l *Logger) Error(format string)
- func (l *Logger) Error1(format string, arg1 any)
- func (l *Logger) Error2(format string, arg1, arg2 any)
- func (l *Logger) Info(format string)
- func (l *Logger) SetLevel(level Level)
- func (l *Logger) Stop(ctx context.Context) error
- func (l *Logger) Trace(format string)
- func (l *Logger) Trace1(format string, arg1 any)
- func (l *Logger) Trace2(format string, arg1, arg2 any)
- func (l *Logger) Trace3(format string, arg1, arg2, arg3 any)
- func (l *Logger) Trace4(format string, arg1, arg2, arg3, arg4 any)
- func (l *Logger) Trace5(format string, arg1, arg2, arg3, arg4, arg5 any)
- func (l *Logger) Trace6(format string, arg1, arg2, arg3, arg4, arg5, arg6 any)
- func (l *Logger) Trace8(format string, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 any)
- func (l *Logger) Warn(format string)
- func (l *Logger) Warn2(format string, arg1, arg2 any)
- func (l *Logger) Warn3(format string, arg1, arg2, arg3 any)
- func (l *Logger) Warn4(format string, arg1, arg2, arg3, arg4 any)
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
}
Logger is a high-performance, non-blocking logger
func NewFromLogrus ¶
NewFromLogrus creates a new Logger that writes to the same output as the given logrus logger
func (*Logger) Debugf ¶ added in v0.71.0
Debugf is the variadic shape. Dispatches to Debug/Debug1/Debug2/Debug3 to avoid allocating an args slice on the fast path when the arg count is known (0-3). Args beyond 3 land on the general variadic path; callers on the hot path should prefer DebugN for known counts.
func (*Logger) Enabled ¶ added in v0.71.0
Enabled reports whether the given level is currently logged. Callers on the hot path should guard log sites with this to avoid boxing arguments into any when the level is off.