callback

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: AGPL-3.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 LogFunc

type LogFunc func(level log.Level, fields log.Fields, log string)

type Logger

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

Logger implements the log.Logger interface. It allows using a custom callback function that will be invoked every time a log message is created.

func New

func New(level log.Level, callback LogFunc) *Logger

func (*Logger) Debug

func (c *Logger) Debug(args ...interface{})

func (*Logger) Debugf

func (c *Logger) Debugf(format string, args ...interface{})

func (*Logger) Error

func (c *Logger) Error(args ...interface{})

func (*Logger) Errorf

func (c *Logger) Errorf(format string, args ...interface{})

func (*Logger) Info

func (c *Logger) Info(args ...interface{})

func (*Logger) Infof

func (c *Logger) Infof(format string, args ...interface{})

func (*Logger) Level

func (c *Logger) Level() log.Level

func (*Logger) Panic

func (c *Logger) Panic(args ...interface{})

func (*Logger) Panicf

func (c *Logger) Panicf(format string, args ...interface{})

func (*Logger) Warn

func (c *Logger) Warn(args ...interface{})

func (*Logger) Warnf

func (c *Logger) Warnf(format string, args ...interface{})

func (*Logger) WithError

func (c *Logger) WithError(err error) log.Logger

func (*Logger) WithField

func (c *Logger) WithField(key string, value interface{}) log.Logger

func (*Logger) WithFields

func (c *Logger) WithFields(fields log.Fields) log.Logger

Jump to

Keyboard shortcuts

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