logger

package
v0.0.0-...-9ab1851 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2018 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

View Source
const (
	FatalLevel = iota
	ErrorLevel
	WarnLevel
	InfoLevel
	DebugLevel
	TraceLevel
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	LoggingLevel int
}

func GetLogger

func GetLogger() *Logger

Returns global logger instance. Init should be called before

func NewLogger

func NewLogger(loggingLevel interface{}) (*Logger, error)

Returns new logger instance

func (Logger) Debug

func (l Logger) Debug(msg string, args ...interface{})

Send debug message

func (Logger) Error

func (l Logger) Error(msg string, args ...interface{})

Send error message

func (Logger) Fatal

func (l Logger) Fatal(msg string, args ...interface{})

TODO: make colours optional Send fatal message

func (Logger) Info

func (l Logger) Info(msg string, args ...interface{})

Send information message

func (*Logger) SetLoggingLevel

func (l *Logger) SetLoggingLevel(loggingLevel interface{}) error

Set logging level Accepts string and int types as input

func (Logger) Trace

func (l Logger) Trace(msg string, args ...interface{})

Send trace message

func (Logger) Warn

func (l Logger) Warn(msg string, args ...interface{})

Send warning message

Jump to

Keyboard shortcuts

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