Documentation ¶
Overview ¶
Package discard is a Logger that doesn't really log anything
Index ¶
- func New() slog.Logger
- type Logger
- func (nl *Logger) Debug() slog.Logger
- func (nl *Logger) Enabled() bool
- func (nl *Logger) Error() slog.Logger
- func (nl *Logger) Fatal() slog.Logger
- func (nl *Logger) Info() slog.Logger
- func (nl *Logger) Panic() slog.Logger
- func (nl *Logger) Print(args ...any)
- func (nl *Logger) Printf(format string, args ...any)
- func (nl *Logger) Println(args ...any)
- func (nl *Logger) Warn() slog.Logger
- func (nl *Logger) WithEnabled() (slog.Logger, bool)
- func (nl *Logger) WithField(string, any) slog.Logger
- func (nl *Logger) WithFields(map[string]any) slog.Logger
- func (nl *Logger) WithLevel(level slog.LogLevel) slog.Logger
- func (nl *Logger) WithStack(int) slog.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger implements slog.Logger but doesn't log anything
func (*Logger) Print ¶
Print pretends to add a log entry with arguments handled in the manner of fmt.Print
func (*Logger) Printf ¶
Printf pretends to add a log entry with arguments handled in the manner of fmt.Printf
func (*Logger) Println ¶
Println pretends to add a log entry with arguments handled in the manner of fmt.Println
func (*Logger) WithEnabled ¶
WithEnabled passes the logger, but also indicates if it's enabled or not. This logger is only enabled for Fatal entries
func (*Logger) WithFields ¶
WithFields pretends to add fields to the Logger
Click to show internal directories.
Click to hide internal directories.