loggermdl

package
v0.0.0-...-706786d Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package loggermdl

Package loggermdl will help you log error

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCallers

func GetCallers(skip int) string

GetCallers will return callers chain

func Init

func Init(fileName string, maxBackupCnt, maxBackupFileSize, maxAgeForBackupFileInDays int, loglevel zapcore.Level)

Init Init Logger maxBackupFileSize, megabytes maxAgeForBackupFile, days

Example
Init("filename", 3, 7, 5, zapcore.DebugLevel)
Output:

func LogDebug

func LogDebug(args ...interface{})

LogDebug logs a message at level Debug on the standard logger.

Example
LogDebug("a")
Output:

func LogError

func LogError(args ...interface{})

LogError logs a message at level Error on the standard logger.

Example
LogError("a")
Output:

func LogHREnd

func LogHREnd()

LogHREnd can end line with <<<

Example
LogHREnd()
Output:

<<<<<<<<<<<<<<<<<<<<<<<

func LogHRStart

func LogHRStart()

LogHRStart can end line with <<<

Example
LogHRStart()
Output:

>>>>>>>>>>>>>>>>>>>>>>>

func LogInfo

func LogInfo(args ...interface{})

LogInfo logs a message at level Info on the standard logger.

Example
LogInfo("a")
Output:

func LogJSONByte

func LogJSONByte(pobj []byte)

LogJSONByte Format string

func LogJSONObject

func LogJSONObject(pobj interface{})

LogJSONObject Format string

func LogJSONString

func LogJSONString(str string)

LogJSONString Format string

func LogPanic

func LogPanic(args ...interface{})

LogPanic logs a message at level Panic on the standard logger.

func LogTable

func LogTable(data []interface{})

LogTable will print data in table form

func LogVars

func LogVars(xvars ...interface{})

LogVars Prints variables with formatting

Example
type Example struct {
	name string
}
a := Example{"name"}

LogVars(a)
Output:

(loggermdl.Example)(loggermdl.Example{
	name: (string)("name"),
})

func LogWarn

func LogWarn(args ...interface{})

LogWarn logs a message at level Warn on the standard logger.

Example
LogWarn("a")
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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