loggermdl

package
v2.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: MIT Imports: 12 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 LogPanic

func LogPanic(args ...interface{})

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

func LogSpot

func LogSpot(args ...interface{})

LogSpot will print block

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