Documentation
¶
Overview ¶
Package logfile 提供节点侧的日志文件写入:按大小滑动的单文件窗口 + 有界尾部读取。
为什么不用 logrotate:节点(精简镜像)不保证装了 logrotate,而 xray.log 是 xray 输出的 唯一副本(agent 用管道接它的 stdout/stderr)。大小滑动只需要「读尾部 + 重写一次」, 且不改变运维心智——永远只有一个文件,grep 到的就是最近的日志。
滑动语义:写入使体积超过上限时,保留文件尾部一半(按行首对齐)再继续追加; 上限 0 = 不限制(回到旧行为)。日志时效性强,故不压缩、不留多份。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.