logging

package
v0.0.0-...-4c68550 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggingMiddleware

func LoggingMiddleware(next http.Handler) http.Handler

func SetupDebugLogger

func SetupDebugLogger()

Types

type Log

type Log struct {
	*slog.Logger
	// contains filtered or unexported fields
}

func NewSlog

func NewSlog(config *LogConfig) (*Log, error)

func (*Log) Close

func (l *Log) Close()

func (*Log) HTTPError

func (l *Log) HTTPError(w http.ResponseWriter, err string, code int)

type LogConfig

type LogConfig struct {
	Logfile string `mapstructure:"logfile"`
	Level   string `mapstructure:"level"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL