package
1.5.4
Repository: https://github.com/yiuterran/go-common.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
Debug 会调试模式下打印caller,其他忽略,减少开销.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IsDebugEnabled 是否打开了debug.
JsonDebug Json格式的debug.
No description provided by the author
JsonInfo 会输出json格式的日志,json日志在单独的文件里.
No description provided by the author
JsonWith 设置默认的field,如模块名称等.
MergeFields 合并,至少有一个参数,结果不影响原来的数据 不要直接修改f,防止并发问题.
No description provided by the author
PanicStack 从panic中恢复并打印日志 注意recover必须在当前函数调用.
RegisterDebugSwitchCallback 注册debug开关切换的回调 注意某些组件并不能在运行时修改debug模式.
UnRegisterDebugSwitchCallback 移除debug开关的回调 会将cb重置为debug为false的状态.
No description provided by the author

# Constants

ConsoleOut 控制台输出.
ErrorFileOut 错误日志.
InfoFileOut 一般日志.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NormalOut 一般输出.
NormalOutWithTrack 有一般输出,也有json的track.
TrackFileOut json日志.

# Variables

Builder 初始化Logger的builder,由于配置项太多.

# Type aliases

Fields 上下文结构,方便在结构体之间传递信息 模仿logrus,非线程安全.
No description provided by the author
No description provided by the author