log

package
v0.0.0-...-16e10c0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StructuredLogger = middleware.RequestLogger(&structuredLogger{})

Functions

func AddAttrs

func AddAttrs(r *http.Request, attrs ...slog.Attr)

func GetLogger

func GetLogger(r *http.Request) *slog.Logger

Types

type StructuredLoggerEntry

type StructuredLoggerEntry struct {
	Attrs   []slog.Attr
	Context func() context.Context
}

func (*StructuredLoggerEntry) Panic

func (l *StructuredLoggerEntry) Panic(v any, stack []byte)

func (*StructuredLoggerEntry) Write

func (l *StructuredLoggerEntry) Write(status, bytes int, header http.Header, elapsed time.Duration, extra any)

Jump to

Keyboard shortcuts

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