# Functions
AddGlobalFields 增加全局字段。.
Alert 警报级别的 v 信息,并写入错误日志。.
Close 关闭日志记录。.
CollectSysLog 将系统日志重定向到 logx info.
ContextWithFields 返回具有给定字段的新上下文。.
Debug writes v into access log.
Debugf writes v with format into access log.
Debugv writes v into access log with json content.
Debugw writes msg along with fields into access log.
DefaultRotateRule 是一个默认的日志轮换规则,默认为 DailyRotateRule。.
Disable 禁用日志记录。.
DisableStat 禁用统计记录。.
Error 将 v 写入错误日志。.
Errorf 将带有格式的 v 写入错误日志。.
ErrorStack 将 v 和调用堆栈一起写入错误日志。.
ErrorStackf 将格式化后的 v 和调用堆栈一起写入错误日志。.
Errorv 将 json 编组后的 v 写入错误日志。 不带有调用堆栈,因为打包堆栈并不优雅。.
Errorw 将 msg 与字段一起写入错误日志。.
Field 将 key, value 转换为 LogField。.
Info 将 v 写入访问日志。.
Infof 将带有格式的 v 写入访问日志。.
Infov 使用 json 内容将 v 写入访问日志。.
Infow 将 msg 与字段一起写入访问日志。.
Must 检查是否有错,有错则记录错误并退出。.
MustSetup 使用给定配置 c 进行设置。有错则退出。.
NewLessLogger returns a LessLogger.
NewLogger 返回一个给定名称和规则等参数的 RotateLogger。.
NewSizeLimitRotateRule 返回具有大小限制的轮换规则。.
NewWriter 创建并返回一个给定的编写器对应的具体编写器。.
Reset 清空当前编写器,返回原编写器。.
SetLevel 设置记录级别,用来抑制一些日志。.
Setup 设置 logx。 允许在不同服务框架中多次调用,但只设置一次。.
SetWriter 设置日志编写器,用于自定义日志记录行为。.
Severe 将 v 和调用堆栈一起写入严重错误日志。.
Severef 将带有格式的 v 和调用堆栈写入严重错误日志。.
Slow 将 v 写入慢执行日志。.
Slowf 将格式化后的 v 写入慢执行日志。.
Slowv 将 json 编组后的 v 写入慢执行日志。.
Sloww 将 msg 与字段一起写入慢执行日志。.
Stat 将 v 写入统计日志。.
Statf 将格式化后的 v 写入统计日志。.
WithCallerSkip 返回具有给定调用者跳跃级别的日志记录器。.
WithColor 是一个助手函数,用于为字符串添加颜色,尽在纯文本编码模式下生效。.
WithColorPadding 是一个助手函数,返回应用了给定颜色的字符串,并带有前导和尾随空格。.
WithContext 返回具有给定上下文跟踪信息的日志记录器。.
WithCooldownMillis 自定义记录堆栈的写入时间间隔。.
WithDuration 返回具有给定持续时间的日志记录器。.
WithGzip 自动压缩日志文件。.
WithKeepDays 自定义日志文件保留天数。.
WithMaxBackups 自定义日志文件的最大保留份数。.
WithMaxSize 自定义日志文件最大尺寸(MB).
WithRotation 自定义日志轮换规则。.
# Constants
DebugLevel 调试一切.
ErrorLevel 包括错误、慢执行和堆栈.
InfoLevel 不包括调试信息.
SevereLevel 仅记录严重的信息.
# Variables
ErrLogFileClosed 是一个表明日志文件已经关闭的错误。.
ErrLogPathNotSet 表示一个日志路径未设置的错误。.
ErrLogServiceNameNotSet 表示一个日志服务名称未设置的错误。.
# Structs
Config 表示一个日志配置项。.
No description provided by the author
LessLogger 是一个记录器,它控制在给定的持续时间内记录一次。.
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author