logger

package
v0.6.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InfoLevel = "info"

Functions

func CanLogHttpRequest

func CanLogHttpRequest(log Logger) bool

func DefaultLogLevel

func DefaultLogLevel(lvl string) string

Types

type ConsoleLogger

type ConsoleLogger struct {
	Logger *logrus.Logger
}

func NewConsoleLogger

func NewConsoleLogger(cfg config.LoggerConfiguration) (*ConsoleLogger, error)

func (*ConsoleLogger) Debug

func (n *ConsoleLogger) Debug(args ...interface{})

func (*ConsoleLogger) Error

func (n *ConsoleLogger) Error(args ...interface{})

func (*ConsoleLogger) Info

func (n *ConsoleLogger) Info(args ...interface{})

func (*ConsoleLogger) Log

func (n *ConsoleLogger) Log(level logrus.Level, args ...interface{})

func (*ConsoleLogger) Trace

func (n *ConsoleLogger) Trace(args ...interface{})

func (*ConsoleLogger) Warn

func (n *ConsoleLogger) Warn(args ...interface{})

func (*ConsoleLogger) WithLogger

func (n *ConsoleLogger) WithLogger() *logrus.Logger

type Logger

type Logger interface {
	Log(level logrus.Level, args ...interface{})
	Info(args ...interface{})
	Debug(args ...interface{})
	Warn(args ...interface{})
	Trace(args ...interface{})
	Error(args ...interface{})
	WithLogger() *logrus.Logger
}

func NewLogger

func NewLogger(cfg config.LoggerConfiguration) (Logger, error)

func NewNoopLogger

func NewNoopLogger() Logger

type NoopLogger

type NoopLogger struct {
	Logger *logrus.Logger
}

func (NoopLogger) Debug

func (NoopLogger) Debug(args ...interface{})

func (NoopLogger) Error

func (NoopLogger) Error(args ...interface{})

func (NoopLogger) Info

func (NoopLogger) Info(args ...interface{})

func (NoopLogger) Log

func (NoopLogger) Log(level logrus.Level, args ...interface{})

func (NoopLogger) Trace

func (NoopLogger) Trace(args ...interface{})

func (NoopLogger) Warn

func (NoopLogger) Warn(args ...interface{})

func (NoopLogger) WithLogger

func (n NoopLogger) WithLogger() *logrus.Logger

Jump to

Keyboard shortcuts

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