logging

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CRITICAL level = iota
	ERROR
	WARNING
	NOTICE
	INFO
	DEBUG
)

Variables

This section is empty.

Functions

func InitLogging added in v0.12.0

func InitLogging() (err error)

InitLogging initialize the logger

Types

type Logger added in v0.12.0

type Logger struct {
	*zap.Logger
	// contains filtered or unexported fields
}

func GetLogger

func GetLogger() (log *Logger)

GetLogger returns the current logger instance

func (*Logger) Critical added in v0.12.0

func (l *Logger) Critical(args ...interface{})

Critical logs a message using CRITICAL as log level.

func (*Logger) Criticalf added in v0.12.0

func (l *Logger) Criticalf(format string, args ...interface{})

Criticalf logs a message using CRITICAL as log level.

func (*Logger) Debug added in v0.12.0

func (l *Logger) Debug(args ...interface{})

Debug logs a message using DEBUG as log level.

func (*Logger) Debugf added in v0.12.0

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

Debugf logs a message using DEBUG as log level.

func (*Logger) Error added in v0.12.0

func (l *Logger) Error(args ...interface{})

Error logs a message using ERROR as log level.

func (*Logger) Errorf added in v0.12.0

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

Errorf logs a message using ERROR as log level.

func (*Logger) Fatal added in v0.12.0

func (l *Logger) Fatal(args ...interface{})

Fatal is equivalent to l.Critical(fmt.Sprint()) followed by a call to os.Exit(1).

func (*Logger) Fatalf added in v0.12.0

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

Fatalf is equivalent to l.Critical followed by a call to os.Exit(1).

func (*Logger) Info added in v0.12.0

func (l *Logger) Info(args ...interface{})

Info logs a message using INFO as log level.

func (*Logger) Infof added in v0.12.0

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

Infof logs a message using INFO as log level.

func (*Logger) Notice added in v0.12.0

func (l *Logger) Notice(args ...interface{})

Notice logs a message using NOTICE as log level.

func (*Logger) Noticef added in v0.12.0

func (l *Logger) Noticef(format string, args ...interface{})

Noticef logs a message using NOTICE as log level.

func (*Logger) Panic added in v0.12.0

func (l *Logger) Panic(args ...interface{})

Panic is equivalent to l.Critical(fmt.Sprint()) followed by a call to panic().

func (*Logger) Panicf added in v0.12.0

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

Panicf is equivalent to l.Critical followed by a call to panic().

func (*Logger) Warning added in v0.12.0

func (l *Logger) Warning(args ...interface{})

Warning logs a message using WARNING as log level.

func (*Logger) Warningf added in v0.12.0

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

Warningf logs a message using WARNING as log level.

Jump to

Keyboard shortcuts

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