Documentation
¶
Index ¶
- func AddField(ctx context.Context, key string, value any)
- func SetJww(verbose bool, w io.Writer)
- func ToContext(ctx context.Context, logger *Logger) context.Context
- type Logger
- func (l *Logger) Debugf(format string, args ...any)
- func (l *Logger) Debugln(args ...any)
- func (l *Logger) Errorf(format string, args ...any)
- func (l *Logger) Errorln(args ...any)
- func (l *Logger) Fatalf(format string, args ...any)
- func (l *Logger) Fatalln(args ...any)
- func (l *Logger) Flush()
- func (l *Logger) Infof(format string, args ...any)
- func (l *Logger) Infoln(args ...any)
- func (l *Logger) IsMetricsEnabled() bool
- func (l *Logger) IsVerboseEnabled() bool
- func (l *Logger) Output() io.Writer
- func (l *Logger) SendDiagsOnErrors() bool
- func (l *Logger) SetOutput(w io.Writer)
- func (l *Logger) SetVerbose(verbose bool)
- func (l *Logger) Warnf(format string, args ...any)
- func (l *Logger) Warnln(args ...any)
- func (l *Logger) WithField(key string, value any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶ added in v1.104.0
type Logger struct {
// contains filtered or unexported fields
}
Logger is the log entry.
func (*Logger) Fatalf ¶ added in v1.104.0
Fatalf logs a message at level Fatal then the process will exit with status set to 1.
func (*Logger) Fatalln ¶ added in v1.104.0
Fatalln logs a message at level Fatal then the process will exit with status set to 1.
func (*Logger) Flush ¶ added in v1.104.0
func (l *Logger) Flush()
Flush flushes the log output and closes the file.
func (*Logger) IsMetricsEnabled ¶ added in v1.104.0
IsMetricsEnabled returns true if it should collect metrics.
func (*Logger) IsVerboseEnabled ¶ added in v1.104.0
IsVerboseEnabled returns true if debug is enabled.
func (*Logger) SendDiagsOnErrors ¶ added in v1.104.0
SendDiagsOnErrors returns true if diagnostics should be sent on errors.
func (*Logger) SetVerbose ¶ added in v1.104.0
SetVerbose sets log level to debug if enabled.
Click to show internal directories.
Click to hide internal directories.