Documentation ¶
Index ¶
- func AccessLogger() gin.HandlerFunc
- func CheckError(err error) bool
- func CheckErrorNoStack(err error) bool
- func CheckErrorNoStackWithMessage(err error, msg string, args ...interface{}) bool
- func CheckErrorWithMessage(err error, msg string, args ...interface{}) bool
- func Debug(msg string)
- func DebugResponse(response *http.Response) string
- func Debugf(msg string, args ...interface{})
- func Error(msg string, err error)
- func Errorf(msg string, err error, args ...any)
- func GetContextLogInfo(c *gin.Context) (string, int, string, string, string)
- func Info(msg string)
- func Infof(msg string, args ...interface{})
- func Init(environment string)
- func InitLogToFile()
- func InitLogToStdout()
- func InitLogToStdoutDebug()
- func LumberJackLogger(filePath string, maxSize int, maxBackups int, maxAge int) *lumberjack.Logger
- func Warn(msg string)
- func Warnf(msg string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶
CheckError check error and return true if error is nil and return false if error is not nil.
func CheckErrorNoStack ¶
CheckError check error and return true if error is nil and return false if error is not nil.
func CheckErrorNoStackWithMessage ¶
CheckErrorNoStackWithMessage check error with message and return true if error is nil and return false if error is not nil.
func CheckErrorWithMessage ¶
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 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 GetContextLogInfo ¶
GetContextLogInfo gets context log information
func Infof ¶
func Infof(msg string, args ...interface{})
Infof logs a formatted message with info log level.
func InitLogToFile ¶
func InitLogToFile()
func InitLogToStdout ¶
func InitLogToStdout()
func InitLogToStdoutDebug ¶
func InitLogToStdoutDebug()
func LumberJackLogger ¶
Types ¶
This section is empty.