log

package
v0.0.0-...-8cf13af Latest Latest
Warning

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

Go to latest
Published: May 14, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessLogger

func AccessLogger() gin.HandlerFunc

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 CheckErrorNoStack

func CheckErrorNoStack(err error) bool

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

func CheckErrorNoStackWithMessage

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

CheckErrorNoStackWithMessage check error with message 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

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()

Init logrus

func InitLogToFile

func InitLogToFile()

func InitLogToStdout

func InitLogToStdout()

func LumberJackLogger

func LumberJackLogger(filePath string, maxSize int, maxBackups int, maxAge int) *lumberjack.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