logging

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

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, kvpairs ...interface{})
	Info(msg string, kvpairs ...interface{})
	Error(msg string, kvpairs ...interface{})
	SetField(key string, val interface{})
	PushFields()
	PopFields()
}

Logger is the interface to our internal logger.

func NewLogrusLogger

func NewLogrusLogger(ctx string, kvpairs ...interface{}) Logger

NewLogrusLogger will instantiate a logger with the given context.

func NewNoopLogger

func NewNoopLogger() Logger

NewNoopLogger will instantiate a logger that does nothing when called.

type LogrusLogger

type LogrusLogger struct {
	// contains filtered or unexported fields
}

LogrusLogger is a thread-safe logger whose properties persist and can be modified.

func (*LogrusLogger) Debug

func (l *LogrusLogger) Debug(msg string, kvpairs ...interface{})

func (*LogrusLogger) Error

func (l *LogrusLogger) Error(msg string, kvpairs ...interface{})

func (*LogrusLogger) Info

func (l *LogrusLogger) Info(msg string, kvpairs ...interface{})

func (*LogrusLogger) PopFields

func (l *LogrusLogger) PopFields()

func (*LogrusLogger) PushFields

func (l *LogrusLogger) PushFields()

func (*LogrusLogger) SetField

func (l *LogrusLogger) SetField(key string, val interface{})

type NoopLogger

type NoopLogger struct{}

NoopLogger implements Logger, but does nothing.

func (*NoopLogger) Debug

func (l *NoopLogger) Debug(msg string, kvpairs ...interface{})

func (*NoopLogger) Error

func (l *NoopLogger) Error(msg string, kvpairs ...interface{})

func (*NoopLogger) Info

func (l *NoopLogger) Info(msg string, kvpairs ...interface{})

func (*NoopLogger) PopFields

func (l *NoopLogger) PopFields()

func (*NoopLogger) PushFields

func (l *NoopLogger) PushFields()

func (*NoopLogger) SetField

func (l *NoopLogger) SetField(key string, val interface{})

Jump to

Keyboard shortcuts

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