Documentation ¶
Index ¶
- func Error(ctx context.Context, msg string, keyvals ...interface{})
- func Info(ctx context.Context, msg string, keyvals ...interface{})
- func WithFn(ctx context.Context, keyvals ...interface{}) context.Context
- func WithLogger(ctx context.Context, logger Adapter) context.Context
- func WithValues(ctx context.Context, keyvals ...interface{}) context.Context
- type Adapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithLogger ¶
WithLogger sets the request context logger and returns the resulting new context.
Types ¶
type Adapter ¶
type Adapter interface { // Info logs an informational message. Info(msg string, keyvals ...interface{}) // Error logs an error. Error(msg string, keyvals ...interface{}) // New appends to the logger context and returns the updated logger logger. New(keyvals ...interface{}) Adapter }
func DefaultLogger ¶
func DefaultLogger() Adapter
DefaultLogger can be used if no fallback can be used.
func ErrorToInfo ¶
ErrorToInfo will redirect error messages to info.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package testlogger provides a logging adapter for tests and benchmarks.
|
Package testlogger provides a logging adapter for tests and benchmarks. |
Click to show internal directories.
Click to hide internal directories.