log

package
v0.0.0-...-8730f33 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: CC0-1.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithDebugLog

func ContextWithDebugLog(ctx context.Context, debugLog Logger) context.Context

func ContextWithErrLog

func ContextWithErrLog(ctx context.Context, errLog Logger) context.Context

func ContextWithInfoLog

func ContextWithInfoLog(ctx context.Context, infoLog Logger) context.Context

func ContextWithSessionDebugLog

func ContextWithSessionDebugLog(ctx context.Context, debugLog Logger) context.Context

func DebugMiddleware

func DebugMiddleware() func(http.Handler) http.Handler

Types

type IdentifyingLogger

type IdentifyingLogger struct {
	Logger
	// contains filtered or unexported fields
}

func (IdentifyingLogger) String

func (i IdentifyingLogger) String() string

type Logger

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

func DebugLog

func DebugLog(ctx context.Context) Logger

func ErrLog

func ErrLog(ctx context.Context) Logger

func InfoLog

func InfoLog(ctx context.Context) Logger

func SessionDebugLog

func SessionDebugLog(ctx context.Context) Logger

func With

func With(l Logger, keyvals ...interface{}) Logger

type LoggerFunc

type LoggerFunc func(...interface{}) error

func (LoggerFunc) Log

func (f LoggerFunc) Log(keyvals ...interface{}) error

type LoggingRoundTripper

type LoggingRoundTripper struct {
	http.RoundTripper

	Logger Logger
}

func (LoggingRoundTripper) RoundTrip

func (l LoggingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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