log

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 0 Imported by: 51

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Debug(msg string, keyvals ...interface{})
	Info(msg string, keyvals ...interface{})
	Warn(msg string, keyvals ...interface{})
	Error(msg string, keyvals ...interface{})
}

Logger is an interface that can be passed to ClientOptions.Logger.

func With added in v1.6.0

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

With creates a child Logger that includes the supplied key-value pairs in each log entry. It does this by using the supplied logger if it implements WithLogger; otherwise, it does so by intercepting every log call.

type WithLogger

type WithLogger interface {
	With(keyvals ...interface{}) Logger
}

WithLogger is an interface that prepend every log entry with keyvals.

Jump to

Keyboard shortcuts

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