package
0.0.0-20230920075655-d853fe5c49d1
Repository: https://github.com/0x00b/gobbq.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
goroutine unsafe AddHook adds a hook to the standard logger hooks.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
String 把i转换成string.
GetStructFields 把结构体转换成一个map.
No description provided by the author
No description provided by the author
No description provided by the author
对日志初始化,参数如下: level :设置日志级别, 方便从配置文件中直接获取,所以使用string organizeLog :是否整理日志, 本地调试或者不需要收集时建议true, 配合OrganizeLogMiddleware 使用 reportCaller :是否打印函数调用栈 out :日志打印到何处 tags :设置日志中获取上下文的接口.
把定义了Json字段的结构本转换为Json字符串输出.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ProtoToPrintString pb协议转换成可打印的json string,会对超长内容截断.
use this
String 入参换成可打印的json string,包括protobuf和普通结构体,或者其他类型 返回 fmt.Stringer, 防止日志级别不够时,还执行这个很消耗资源的操作.
StructToPrintString 结构体转换成可打印的json string,会对超长内容截断.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
处理string的方式,默认截断后面补上 "...".
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PrintProtoLen 设置打印pb报文的长度,超过这个长度将会对报文中的超长字段进行处理(截断).
PrintSliceLen 设置打印报文中的slice或者array的长度,超过这个长度将会对报文中的超长内容进行处理(截断).
PrintStringLen 设置打印报文中字符串的长度,超过这个长度将会对报文中的超长字段进行处理(截断).
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
goroutine unsafe, 里面的变量只能在初始化时赋值 Hook hook for log.
JSONFormatter formats logs into parsable json.
TextFormatter formats logs into text.
# Interfaces
No description provided by the author
TagGetter.
No description provided by the author
# Type aliases
No description provided by the author
FieldMap allows customization of the key names for default fields.
HandlerFormatFile format file name.
HandlerFormatFunc format function name.
No description provided by the author