Documentation ¶
Index ¶
- func NewLoggingResponseWriter(w http.ResponseWriter) *loggingResponseWriter
- func NewSlogLogger(opts SlogOptions) *slog.Logger
- func ParseLogLevelFromEnv(key string) slog.Level
- func ParseLogLevelFromString(s string) slog.Level
- type HttpLogger
- type HttpLoggerOptions
- type Logger
- type Options
- type SlogOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoggingResponseWriter ¶ added in v1.1.0
func NewLoggingResponseWriter(w http.ResponseWriter) *loggingResponseWriter
func NewSlogLogger ¶ added in v1.1.0
func NewSlogLogger(opts SlogOptions) *slog.Logger
func ParseLogLevelFromEnv ¶ added in v1.1.0
func ParseLogLevelFromString ¶ added in v1.1.0
Types ¶
type HttpLogger ¶ added in v1.1.0
type HttpLogger struct {
HttpLoggerOptions
}
func NewHttpLogger ¶ added in v1.1.0
func NewHttpLogger(opts HttpLoggerOptions) *HttpLogger
type HttpLoggerOptions ¶ added in v1.1.0
type HttpLoggerOptions struct { // Logger, can be set if you want to use a different logger than the one provided by the HttpLogger Logger *slog.Logger // LogLevel, can be set if you want to use a different log level than the one provided by the HttpLogger // defaults to log.DebugLevel LogLevel log.Level ShowHeaders bool SilentPaths []string }
type Logger ¶
Click to show internal directories.
Click to hide internal directories.