Documentation
¶
Index ¶
- Constants
- func AddMiddleLayers(middlelayers ...MiddleLayer)
- func Debug(ctx context.Context, format string, a ...any)
- func Error(ctx context.Context, format string, a ...any)
- func Fatal(ctx context.Context, format string, a ...any)
- func Info(ctx context.Context, format string, a ...any)
- func Infof(ctx context.Context, format string, fields *Fields)
- func Infow(ctx context.Context, message string, fs *Fields)
- func Panic(ctx context.Context, format string, a ...any)
- func Warn(ctx context.Context, format string, a ...any)
- type Config
- type Fields
- type LogLevel
- type MiddleLayer
- type RequestContext
Constants ¶
View Source
const (
RequestContextKey string = "RequestContext"
)
Variables ¶
This section is empty.
Functions ¶
func AddMiddleLayers ¶
func AddMiddleLayers(middlelayers ...MiddleLayer)
Types ¶
type Fields ¶
type Fields struct {
// contains filtered or unexported fields
}
func RequestMiddleLayer ¶
type LogLevel ¶
type LogLevel string
const ( DebugLevel LogLevel = "debug" // InfoLevel is the default logging priority. InfoLevel LogLevel = "info" // WarnLevel logs are more important than Info, but don't need individual // human review. WarnLevel LogLevel = "warn" // ErrorLevel logs are high-priority. If an application is running smoothly, // it shouldn't generate any error-level logs. ErrorLevel LogLevel = "error" // DPanicLevel logs are particularly important errors. In development the // logger panics after writing the message. PanicLevel LogLevel = "panic" // FatalLevel logs a message, then calls os.Exit(1). FatalLevel LogLevel = "fatal" )
type MiddleLayer ¶
Click to show internal directories.
Click to hide internal directories.