logger

package
v0.0.0-...-a03fb21 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fields

type Fields logrus.Fields

Fields wraps logrus.Fields, which is a map[string]interface{}

type Logger

type Logger struct {
	*logrus.Logger
}

Logging wrapper on top of sirupsen/logrus Wraps https://godoc.org/github.com/sirupsen/logrus

func New

func New(cfg *config.Config) *Logger

func (*Logger) Debug

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

Debug logs a message at level Debug on the standard logger.

func (*Logger) DebugWithFields

func (lg *Logger) DebugWithFields(l interface{}, f Fields)

Debug logs a message with fields at level Debug on the standard logger.

func (*Logger) Error

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

Error logs a message at level Error on the standard logger.

func (*Logger) ErrorWithFields

func (lg *Logger) ErrorWithFields(l interface{}, f Fields)

Debug logs a message with fields at level Debug on the standard logger.

func (*Logger) Exit

func (lg *Logger) Exit(code int)

Exit runs all the Logrus atexit handlers and then terminates the program using os.Exit(code)

func (*Logger) Fatal

func (lg *Logger) Fatal(args ...interface{})

Fatal logs a message at level Fatal on the standard logger.

func (*Logger) FatalWithFields

func (lg *Logger) FatalWithFields(l interface{}, f Fields)

Debug logs a message with fields at level Debug on the standard logger.

func (*Logger) Info

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

Info logs a message at level Info on the standard logger.

func (*Logger) InfoWithFields

func (lg *Logger) InfoWithFields(l interface{}, f Fields)

Debug logs a message with fields at level Debug on the standard logger.

func (*Logger) Panic

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

Panic logs a message at level Panic on the standard logger.

func (*Logger) PanicWithFields

func (lg *Logger) PanicWithFields(l interface{}, f Fields)

Debug logs a message with fields at level Debug on the standard logger.

func (*Logger) SetLogFormatter

func (lg *Logger) SetLogFormatter(formatter logrus.Formatter)

func (*Logger) SetLogLevel

func (lg *Logger) SetLogLevel(level logrus.Level)

func (*Logger) SetOutput

func (lg *Logger) SetOutput(out io.Writer)

func (*Logger) Warn

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

Warn logs a message at level Warn on the standard logger.

func (*Logger) WarnWithFields

func (lg *Logger) WarnWithFields(l interface{}, f Fields)

Debug logs a message with fields at level Debug on the standard logger.

Jump to

Keyboard shortcuts

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