logging

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: Unlicense Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogRequests

func LogRequests(logger Logger) sr.Middleware

Types

type Logger

type Logger interface {
	Log(keyvals ...any) error
}

Logger records log lines to an output.

func DefaultLoggers

func DefaultLoggers() (debug, info, warn, error Logger)

DefaultLoggers produces helpful base loggers for each level.

They write logfmt to standard out, annotated with ANSI colors depending on the level.

Jump to

Keyboard shortcuts

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