Documentation
¶
Index ¶
- Variables
- func Setup(verbose bool)
- func WithLogger(ctx context.Context, logger *Logger) context.Context
- type Logger
- func (l *Logger) Debugf(msg string, args ...any)
- func (l *Logger) Errorf(msg string, args ...any)
- func (l *Logger) Infof(msg string, args ...any)
- func (l *Logger) Printf(format string, args ...any)
- func (l *Logger) Println(args ...any)
- func (l *Logger) Success(msg string, args ...any)
- func (l *Logger) Verbosef(format string, args ...any)
- func (l *Logger) Verboseln(args ...any)
- func (l *Logger) Warnf(msg string, args ...any)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLogger = New(false)
Functions ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger provides context-aware leveled logging.
func FromContext ¶
FromContext retrieves the logger stored in ctx, or returns DefaultLogger.
func (*Logger) Printf ¶ added in v1.3.0
Printf writes a formatted string to output. A newline is appended if the formatted string does not end with one.
Click to show internal directories.
Click to hide internal directories.