Documentation ¶
Overview ¶
*
- reference:
- - [go语言读取当前文件名行号和函数名](https://www.jianshu.com/p/7aa54489bb4b)
- - [如何在Go中获取函数的名称?](https://codeday.me/bug/20170831/60552.html)
- - [golang 几种字符串的拼接方式](https://blog.csdn.net/iamlihongwei/article/details/79551259)
- - [基础知识 - Golang 中的格式化输入输出](https://www.cnblogs.com/golove/p/3284304.html)
*
Index ¶
- Constants
- func Debug(text string)
- func Debugf(format string, v ...interface{})
- func Error(text string)
- func Errorf(format string, v ...interface{})
- func GetLevelString(level int32) string
- func Info(text string)
- func Infof(format string, v ...interface{})
- func Warn(text string)
- func Warnf(format string, v ...interface{})
- type LogText
Constants ¶
View Source
const ( LEVEL_DEBUG = 0 LEVEL_INFO = 10 LEVEL_NOTICE = 20 LEVEL_WARN = 30 LEVEL_ERROR = 40 LEVEL_FETAL = 50 )
Variables ¶
This section is empty.
Functions ¶
func GetLevelString ¶
Types ¶
type LogText ¶
type LogText struct { Datetime string `json:"datetime,omitempty"` Timestamp float64 `json:"timestamp,omitempty"` LevelInt int32 `json:"levelInt,omitempty"` LevelStr string `json:"levelStr,omitempty"` File string `json:"file,omitempty"` Line int32 `json:"line,omitempty"` Function string `json:"function,omitempty"` Text string `json:"text"` }
func ParseLogText ¶
Click to show internal directories.
Click to hide internal directories.