logging

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(format string, v ...interface{})

Debug logs a message with severity DEBUG.

func Error

func Error(format string, v ...interface{})

Error logs a message with severity ERROR.

func Fatal

func Fatal(format string, v ...interface{})

Fatal logs a message with severity ERROR which is then followed by a call to os.Exit().

func Info

func Info(format string, v ...interface{})

Info logs a message with severity INFO.

func IsDebug

func IsDebug() bool

IsDebug returns true if current level is debug

func IsError

func IsError() bool

IsError returns true if current level is error

func IsFatal

func IsFatal() bool

IsFatal returns true if current level is fatal

func IsInfo

func IsInfo() bool

IsInfo returns true if current level is info

func IsPanic

func IsPanic() bool

IsPanic returns true if current level is panic

func IsWarning

func IsWarning() bool

IsWarning returns true if current level is warn

func SetLevel

func SetLevel(level string)

SetLevel sets the log level. Accepted levels are panic, fatal, error, warn, info and debug.

func Warning

func Warning(format string, v ...interface{})

Warning logs a message with severity WARNING.

Types

type Formatter

type Formatter struct {
}

Formatter is the struct used in the logging package.

func (*Formatter) Format

func (c *Formatter) Format(entry *log.Entry) ([]byte, error)

Format builds the log desired log format.

Jump to

Keyboard shortcuts

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