Documentation ¶
Index ¶
- Constants
- func Debug(ctx context.Context, logType, msg, memo string)
- func Error(ctx context.Context, logType string, err error, memo string)
- func Fatal(msg string, fields ...LogField)
- func Info(ctx context.Context, logType, msg, memo string)
- func Init()
- func JSON(ctx context.Context, logType string, obj interface{}, memo string)
- func NewLogger(logFile string, logLevelName string)
- func Panic(msg error, fields ...LogField)
- func Warn(ctx context.Context, logType string, msg, memo string)
- type LogField
- func Any(key string, value interface{}) LogField
- func Bool(key string, val bool) LogField
- func ByteString(key string, val []byte) LogField
- func Duration(key string, val time.Duration) LogField
- func Float32(key string, val float32) LogField
- func Float64(key string, val float64) LogField
- func Int(key string, val int) LogField
- func Int32(key string, val int32) LogField
- func Int64(key string, val int64) LogField
- func String(key string, val string) LogField
- func Time(key string, val time.Time) LogField
- func Uintptr(key string, val uintptr) LogField
Constants ¶
View Source
const ( REQ_START = "请求开始" REQ_PARAMS = "请求参数" REQ_RTNS = "请求返回值" REQ_END = "请求结束" REQ_PARAMS_ERR = "请求参数不合法" FUNC_START = "函数开始" FUNC_PARAMS = "函数参数" FUNC_RTNS = "函数返回值" FUNC_END = "函数结束" FUNC_PARAMS_ERR = "函数参数不合法" DATA_ERR = "参数中<data>格式错误" REC_NEW = "新增" REC_CHG = "更新" REC_DEL = "删除" REC_QRY = "查询" SQL_QRY = "查询语句" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.