# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetRequestIdKey 获取链路ID.
GetWriteSyncer 按天切割按大小切割 filename 文件名 RotationSize 每个文件的大小 MaxAge 文件最大保留天数 RotationCount 最大保留文件个数 RotationTime 设置文件分割时间 RotationCount 设置保留的最大文件数量.
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
InitLog 初始化日志文件 logPath= /home/logs/app/appName/childPath.
NewLogContext new obj.
设置环境变量,标识当前应用运行的环境,默认值dev.
设置应用名称,默认值default-app.
设置子目录—+文件名,保证一个类型的文件在同一个文件夹下面便于区分、默认值glogs/%Y-%m-%d.log.
SetLogMaxAge 设置文件最大保留时间、默认值7天.
设置单个文件最大值byte,默认值32M.
设置日志目录,这个是主目录,程序会给此目录拼接上项目名,子目录以及文件,默认值/home/logs/app.
设置日志类型,日志类型目前分为2种,console和file,默认值file.
SetNoBuffWriter 设置无缓冲写入日志,比较消耗性能.
SetRotationCount 设置保留的最大文件数量、没有默认值(表示不限制).
SetRotationTime 设置文件分割时间、默认值24*time.Hour(按天分割).
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
日志类型.
链路ID.
默认时间.
外部链路ID.
# Variables
默认应用环境.
默认应用名称.
默认版本.
默认子目录.
No description provided by the author
默认文件目录.
默认日志类型.
默认保留90天.
不不开启无缓冲写入.
默认不限制.
默认大小为32M.
默认每天轮转一次.
默认运行环境.
No description provided by the author
No description provided by the author
记录类型 zipkin 和 jaeger.
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
# Interfaces
LoggerContext 日志.