Documentation ¶
Index ¶
- type AppLogger
- func (a *AppLogger) Debug(ctx context.Context, args ...interface{})
- func (a *AppLogger) Debugf(ctx context.Context, format string, args ...interface{})
- func (a *AppLogger) Error(ctx context.Context, args ...interface{})
- func (a *AppLogger) Errorf(ctx context.Context, format string, args ...interface{})
- func (a *AppLogger) Fatal(ctx context.Context, args ...interface{})
- func (a *AppLogger) Fatalf(ctx context.Context, format string, args ...interface{})
- func (a *AppLogger) GenerateRequestID(prefix string) (string, error)
- func (a *AppLogger) Info(ctx context.Context, args ...interface{})
- func (a *AppLogger) Infof(ctx context.Context, format string, args ...interface{})
- func (a *AppLogger) Level(level Level)
- func (a *AppLogger) Notify(ctx context.Context, level Level, args ...interface{})
- func (a *AppLogger) Notifyf(ctx context.Context, level Level, format string, args ...interface{})
- func (a *AppLogger) Output(w io.Writer)
- func (a *AppLogger) Panic(ctx context.Context, args ...interface{})
- func (a *AppLogger) Panicf(ctx context.Context, format string, args ...interface{})
- func (a *AppLogger) Warn(ctx context.Context, args ...interface{})
- func (a *AppLogger) Warnf(ctx context.Context, format string, args ...interface{})
- func (a *AppLogger) WithItems(ctx context.Context, level Level, fields map[string]interface{}, ...)
- func (a *AppLogger) WithItemsf(ctx context.Context, level Level, fields map[string]interface{}, format string, ...)
- type Level
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppLogger ¶
func (*AppLogger) GenerateRequestID ¶
type Level ¶
type Level uint32
Level type
const ( // PanicLevel level, highest level of severity. Logs and then calls panic with the // message passed to Debug, Info, ... PanicLevel Level = iota // FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the // logging level is set to Panic. FatalLevel // ErrorLevel level. Logs. Used for errors that should definitely be noted. // Commonly used for hooks to send errors to an error tracking service. ErrorLevel // WarnLevel level. Non-critical entries that deserve eyes. WarnLevel // InfoLevel level. General operational entries about what's going on inside the // application. InfoLevel // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DebugLevel // TraceLevel level. Designates finer-grained informational events than the Debug. TraceLevel FieldKeyTraceID = "dd.trace_id" FieldKeySpanID = "dd.span_id" )
type Logger ¶
type Logger interface { Debugf(ctx context.Context, format string, args ...interface{}) Infof(ctx context.Context, format string, args ...interface{}) Warnf(ctx context.Context, format string, args ...interface{}) Errorf(ctx context.Context, format string, args ...interface{}) Fatalf(ctx context.Context, format string, args ...interface{}) Panicf(ctx context.Context, format string, args ...interface{}) Debug(ctx context.Context, args ...interface{}) Info(ctx context.Context, args ...interface{}) Warn(ctx context.Context, args ...interface{}) Error(ctx context.Context, args ...interface{}) Fatal(ctx context.Context, args ...interface{}) Panic(ctx context.Context, args ...interface{}) Level(level Level) Output(w io.Writer) GenerateRequestID(prefix string) (string, error) Notify(ctx context.Context, level Level, args ...interface{}) Notifyf(ctx context.Context, level Level, format string, args ...interface{}) WithItems(ctx context.Context, level Level, fields map[string]interface{}, args ...interface{}) WithItemsf(ctx context.Context, level Level, fields map[string]interface{}, format string, args ...interface{}) }
Logger interface
Click to show internal directories.
Click to hide internal directories.