logger

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2019 License: MIT Imports: 5 Imported by: 0

README

logger

Logger provides a "pretty" logger for golang which can also include file locations for errors including line numbers, etc.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(s string)

Error ...

func Errorf

func Errorf(s string, i ...interface{})

Errorf ...

func Fatal

func Fatal(s string)

Fatal ...

func Fatalf

func Fatalf(s string, i ...interface{})

Fatalf ...

func Info

func Info(s string)

Info ...

func Infof

func Infof(s string, i ...interface{})

Infof ...

func Print

func Print(s string)

Print ...

func Printf

func Printf(s string, i ...interface{})

Printf ...

func Println

func Println(i ...interface{})

Println ...

func Set

func Set(hook ContextHook, fileLoc string, debug bool, setReport bool) error

Set modifies the logger

func SetLoggerLevel added in v0.1.7

func SetLoggerLevel(debug bool)

SetLoggerLevel sets the logger level

func SetLoggerLoc

func SetLoggerLoc(loc string) error

SetLoggerLoc sets the file location of the logger

func Warn

func Warn(s string)

Warn ...

func Warnf

func Warnf(s string, i ...interface{})

Warnf ...

Types

type ContextHook

type ContextHook struct{}

ContextHook ...

func (ContextHook) Fire

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

Fire is run each time the logger is fired and is used to include the file and line from which the log was called.

func (ContextHook) Levels

func (hook ContextHook) Levels() []logrus.Level

Levels ...

Jump to

Keyboard shortcuts

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