Documentation ¶
Index ¶
Constants ¶
View Source
const ( LevelDebug = "debug" LevelInfo = "info" LevelWarn = "warn" LevelError = "error" )
Variables ¶
View Source
var AttrKey = AttrKeys{ App: AppAttrKeys{ Name: "name", Version: "version", }, HTTP: HTTPAttrKeys{ Body: "body", BodySize: "body_size", Headers: "headers", Method: "method", Path: "path", Status: "status", }, IP: "ip", PID: "pid", ResponseTime: "response_time", Tags: "tags", }
Functions ¶
This section is empty.
Types ¶
type AppAttrKeys ¶
type AttrKeys ¶
type AttrKeys struct { App AppAttrKeys HTTP HTTPAttrKeys IP string PID string ResponseTime string Tags string }
type CustomLogger ¶
CustomLogger encapsulates a logger with an associated log level and toggle
func (*CustomLogger) CreateContextLogger ¶
func (l *CustomLogger) CreateContextLogger(traceID string) *slog.Logger
CreateContextLogger returns a new child logger with attached trace ID
type DevHandler ¶
type DevHandler struct {
// contains filtered or unexported fields
}
func NewDevHandler ¶
func NewDevHandler(meta app.Metadata, opts *slog.HandlerOptions) *DevHandler
Click to show internal directories.
Click to hide internal directories.