loghandler

package
v0.0.0-...-a23e254 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LogPath  日志地址
	LogPath = "./logs/rpc_ts.log"
)

log 的一些设置

Variables

This section is empty.

Functions

func Alert

func Alert(f interface{}, v ...interface{})

Alert 方法

func Critical

func Critical(f interface{}, v ...interface{})

Critical 方法

func Debug

func Debug(f interface{}, v ...interface{})

Debug 方法

func Emergency

func Emergency(f interface{}, v ...interface{})

Emergency 方法

func Error

func Error(f interface{}, v ...interface{})

Error 方法

func GetUniqueID

func GetUniqueID() int64

GetUniqueID 统一获取 uid

func Info

func Info(f interface{}, v ...interface{})

Info 方法

func Notice

func Notice(f interface{}, v ...interface{})

Notice 方法

func SetUniqueID

func SetUniqueID(id int64)

SetUniqueID 生成 uniqueID

func Warn

func Warn(f interface{}, v ...interface{})

Warn 方法

Types

type LogInfoTemplate

type LogInfoTemplate struct {
	UniqueID int64 `json:"uniqueID"`
	Data     interface{}
}

LogInfoTemplate log 信息模板

func GetLogTemplate

func GetLogTemplate() LogInfoTemplate

GetLogTemplate 获取 log 模板

Jump to

Keyboard shortcuts

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