logging

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Unlicense Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogRequests

func LogRequests(logger Logger) types.Middleware

Types

type Logger

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

Logger records log lines to an output.

func Base added in v1.4.0

func Base() Logger

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