Help us shape the future of Go! Take the 2026 Go Developer Survey

log

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

func Debugf

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

func Error

func Error(args ...interface{})

func Errorf

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

func Fatal

func Fatal(args ...interface{})

func Fatalf

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

func Info

func Info(args ...interface{})

func Infof

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

func InitLogger

func InitLogger()

func Panic

func Panic(args ...interface{})

func Panicf

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

func Print

func Print(args ...interface{})

func Printf

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

func SetLevel

func SetLevel(level Level)

func SetOutput

func SetOutput(out io.Writer)

func Warn

func Warn(args ...interface{})

func Warnf

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

func Warning

func Warning(args ...interface{})

func Warningf

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

func WithField

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

func WithFields

func WithFields(fields Fields) *logrus.Entry

Types

type Fields

type Fields logrus.Fields

type Level

type Level logrus.Level
const (
	// PanicLevel level, highest level of severity. Logs and then calls panic with the
	// message passed to Debug, Info, ...
	PanicLevel Level = iota
	// FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the
	// logging level is set to Panic.
	FatalLevel
	// ErrorLevel level. Logs. Used for errors that should definitely be noted.
	// Commonly used for hooks to send errors to an error tracking service.
	ErrorLevel
	// WarnLevel level. Non-critical entries that deserve eyes.
	WarnLevel
	// InfoLevel level. General operational entries about what's going on inside the
	// application.
	InfoLevel
	// DebugLevel level. Usually only enabled when debugging. Very verbose logging.
	DebugLevel
)

func GetLevel

func GetLevel() Level

type Logger

type Logger logrus.Logger

type ShowuserlogHook

type ShowuserlogHook struct {
	Level logrus.Level
}

ShowuserlogHook writes all levels of logrus entries to a file for later analysis

func NewShowuserlogHook

func NewShowuserlogHook(l logrus.Level) (*ShowuserlogHook, error)

func (*ShowuserlogHook) Fire

func (hook *ShowuserlogHook) Fire(entry *logrus.Entry) error

func (*ShowuserlogHook) Levels

func (hook *ShowuserlogHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

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