在 Lighttpd 中按日期或文件大小拆分日志文件

发布于 2024-07-08 18:48:08 字数 298 浏览 4 评论 0原文

到目前为止,我发现做到这一点的唯一方法是告诉 Lighty 通过一个名为“vlogger”的应用程序传输其日志。 有没有一种方法可以按日期分解日志文件而不引入任何外部依赖项或 cron 作业? 我觉得可能有一种方法可以通过配置文件变量来做到这一点,但我的 Lighty-fu 还不够强大。

编辑:看起来logrotate可能是我最好的选择。

So far the only way I've found to do this is by telling Lighty to pipe its logs through an app called "vlogger". Is there a way to break out log files by date without introducing any external dependencies or cron jobs? I feel like there might be a way to do it with config file variables, but my Lighty-fu just isn't strong enough.

Edit: Looks like logrotate may be my best bet.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

任谁 2024-07-15 18:48:08

我只知道使用 syslog 进行日志处理或其他软件(例如“logrotate”或类似的软件)的选项。 也许手册有帮助。

I only know the option to use syslog for log handling or additional software like "logrotate" or something similiar. Perhaps the manual helps.

笑叹一世浮沉 2024-07-15 18:48:08

以下是为 lighty 配置 logrotate 的方法:Lighttpd:日志文件轮换

Here’s how to configure logrotate for lighty: Lighttpd: Log File Rotation

断爱 2024-07-15 18:48:08

我使用 cronolog 而不是 vlogger 来执行此操作,没有任何问题。 不幸的是,您无法使用此技术来轮换错误日志。 查看旧的 Lighttpd 错误报告,有一个补丁可以修复错误日志,但它被上游拒绝了。

Im using cronolog instead of vlogger to do this without any problems. Unfortunately, you can't use this technique to rotate the error log. Looking at old Lighttpd bug reports, there was a patch to fix this for error logs but it was rejected upsteam.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文