log

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logfile *os.File

Functions

func Debug

func Debug(args ...interface{})

Debug package-level convenience method.

func Debugf

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

Debugf package-level convenience method.

func Debugln

func Debugln(args ...interface{})

Debugln package-level convenience method.

func Error

func Error(args ...interface{})

Error package-level convenience method.

func Errorf

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

Errorf package-level convenience method.

func Errorln

func Errorln(args ...interface{})

Errorln package-level convenience method.

func Fatal

func Fatal(args ...interface{})

Fatal package-level convenience method.

func Fatalf

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

Fatalf package-level convenience method.

func Fatalln

func Fatalln(args ...interface{})

Fatalln package-level convenience method.

func GetNewLogrusLogger

func GetNewLogrusLogger(home string) *logrus.Logger

func Info

func Info(args ...interface{})

Info package-level convenience method.

func Infof

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

Infof package-level convenience method.

func Infoln

func Infoln(args ...interface{})

Infoln package-level convenience method.

func NewLogger

func NewLogger(cfg config.Provider) *logrus.Logger

NewLogger returns a configured logrus instance

func Panic

func Panic(args ...interface{})

Panic package-level convenience method.

func Panicf

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

Panicf package-level convenience method.

func Panicln

func Panicln(args ...interface{})

Panicln package-level convenience method.

func Print

func Print(args ...interface{})

Print package-level convenience method.

func Printf

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

Printf package-level convenience method.

func Println

func Println(args ...interface{})

Println package-level convenience method.

func Warn

func Warn(args ...interface{})

Warn package-level convenience method.

func Warnf

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

Warnf package-level convenience method.

func Warning

func Warning(args ...interface{})

Warning package-level convenience method.

func Warningf

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

Warningf package-level convenience method.

func Warningln

func Warningln(args ...interface{})

Warningln package-level convenience method.

func Warnln

func Warnln(args ...interface{})

Warnln package-level convenience method.

Types

type Fields

type Fields map[string]interface{}

Fields is a map string interface to define fields in the structured log

func (Fields) With

func (f Fields) With(k string, v interface{}) Fields

With allow us to define fields in out structured logs

func (Fields) WithFields

func (f Fields) WithFields(f2 Fields) Fields

WithFields allow us to define fields in out structured logs

type Logger

type Logger interface {
	Debug(args ...interface{})
	Debugf(format string, args ...interface{})
	Debugln(args ...interface{})
	Error(args ...interface{})
	Errorf(format string, args ...interface{})
	Errorln(args ...interface{})
	Fatal(args ...interface{})
	Fatalf(format string, args ...interface{})
	Fatalln(args ...interface{})
	Info(args ...interface{})
	Infof(format string, args ...interface{})
	Infoln(args ...interface{})
	Panic(args ...interface{})
	Panicf(format string, args ...interface{})
	Panicln(args ...interface{})
	Print(args ...interface{})
	Printf(format string, args ...interface{})
	Println(args ...interface{})
	Warn(args ...interface{})
	Warnf(format string, args ...interface{})
	Warning(args ...interface{})
	Warningf(format string, args ...interface{})
	Warningln(args ...interface{})
	Warnln(args ...interface{})
}

Logger defines a set of methods for writing application logs. Derived from and inspired by logrus.Entry.

func WithFields

func WithFields(fields Fields) Logger

WithFields allow us to define fields in out structured logs

Jump to

Keyboard shortcuts

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