log

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2017 License: MIT Imports: 7 Imported by: 128

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error) bool

CheckError check error and return true if error is nil and return false if error is not nil.

func CheckErrorWithMessage

func CheckErrorWithMessage(err error, msg string, args ...interface{}) bool

CheckErrorWithMessage check error with message and log messages with stack. And then return true if error is nil and return false if error is not nil.

func Debug

func Debug(msg string)

Debug logs a message with debug log level.

func DebugResponse

func DebugResponse(response *http.Response) string

DebugResponse : log response body data for debugging

func Debugf

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

Debugf logs a formatted message with debug log level.

func Error

func Error(msg string)

Error logs a message with error log level.

func Errorf

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

Errorf logs a formatted message with error log level.

func Fatal

func Fatal(msg string)

Fatal logs a message with fatal log level.

func Fatalf

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

Fatalf logs a formatted message with fatal log level.

func Info

func Info(msg string)

Info logs a message with info log level.

func Infof

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

Infof logs a formatted message with info log level.

func Init

func Init(environment string)

Init logrus

func InitLogToFile

func InitLogToFile()

InitLogToFile : set logrus to output in file

func InitLogToStdout

func InitLogToStdout()

InitLogToStdout : set logrus to stdout

func InitLogToStdoutDebug

func InitLogToStdoutDebug()

InitLogToStdoutDebug : set logrus to debug param

func LumberJackLogger

func LumberJackLogger(filePath string, maxSize int, maxBackups int, maxAge int) *lumberjack.Logger

LumberJackLogger : Initialize logger

func Panic

func Panic(msg string)

Panic logs a message with panic log level.

func Panicf

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

Panicf logs a formatted message with panic log level.

func Warn

func Warn(msg string)

Warn logs a message with warn log level.

func Warnf

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

Warnf logs a formatted message with warn log level.

Types

This section is empty.

Jump to

Keyboard shortcuts

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