logging

package
v0.0.0-...-84d53aa Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: GPL-3.0 Imports: 12 Imported by: 28

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Console

func Console() *logrus.Logger

Console returns console logger.

func Debug

func Debug(args ...interface{})

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

func Debugf

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

Debugf logs a message at level Debug on the verbose logger.

func Debugln

func Debugln(args ...interface{})

Debugln logs a message at level Debug on the verbose logger.

func Error

func Error(args ...interface{})

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

func Errorf

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

Errorf logs a message at level Error on the verbose logger.

func Errorln

func Errorln(args ...interface{})

Errorln logs a message at level Error on the verbose logger.

func Fatal

func Fatal(args ...interface{})

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

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf logs a message at level Fatal on the verbose logger.

func Fatalln

func Fatalln(args ...interface{})

Fatalln logs a message at level Fatal on the verbose logger.

func Info

func Info(args ...interface{})

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

func Infof

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

Infof logs a message at level Info on the verbose logger.

func Infoln

func Infoln(args ...interface{})

Infoln logs a message at level Info on the verbose logger.

func Init

func Init(path string, level string, age uint32)

Init loggers.

func InitTestLogger

func InitTestLogger(path string) *test.Hook

InitTestLogger returns hook for testing log entry.

func NewFileRotateHooker

func NewFileRotateHooker(path string, age uint32) logrus.Hook

NewFileRotateHooker returns file rotate hooker.

func NewFunctionHooker

func NewFunctionHooker() logrus.Hook

NewFunctionHooker adds function info to log entry.

func Panic

func Panic(args ...interface{})

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

func Panicf

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

Panicf logs a message at level Panic on the verbose logger.

func Panicln

func Panicln(args ...interface{})

Panicln logs a message at level Panic on the verbose logger.

func Print

func Print(args ...interface{})

Print logs a message at level Info on the verbose logger.

func Printf

func Printf(format string, args ...interface{})

Printf logs a message at level Info on the verbose logger.

func Println

func Println(args ...interface{})

Println logs a message at level Info on the verbose logger.

func SetNullLogger

func SetNullLogger()

SetNullLogger sets null logger.

func Warn

func Warn(args ...interface{})

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

func Warnf

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

Warnf logs a message at level Warn on the verbose logger.

func Warning

func Warning(args ...interface{})

Warning logs a message at level Warn on the verbose logger.

func Warningf

func Warningf(format string, args ...interface{})

Warningf logs a message at level Warn on the verbose logger.

func Warningln

func Warningln(args ...interface{})

Warningln logs a message at level Warn on the verbose logger.

func Warnln

func Warnln(args ...interface{})

Warnln logs a message at level Warn on the verbose logger.

func WithError

func WithError(err error) *logrus.Entry

WithError creates an entry and adds an error to it, using the value defined in ErrorKey as key.

func WithField

func WithField(key string, value interface{}) *logrus.Entry

WithField creates an entry and adds a field to it. If you want multiple fields, use `WithFields`.

Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal or Panic on the Entry it returns.

func WithFields

func WithFields(fields logrus.Fields) *logrus.Entry

WithFields creates an entry and adds multiple fields to it. This is simply a helper for `WithField`, invoking it once for each field.

Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal or Panic on the Entry it returns.

Types

This section is empty.

Jump to

Keyboard shortcuts

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