如何为 traefik 启用 logrotation? [英] How to enable logrotation for traefik?

查看:53
本文介绍了如何为 traefik 启用 logrotation?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为日志文件启用日志轮换,例如访问日志.

How do I enable log rotation for log files e.g. access.log.

这是内置的吗?

文档只说这允许日志由外部程序轮换和处理,例如 logrotate"

Docs only say "This allows the logs to be rotated and processed by an external program, such as logrotate"

推荐答案

日志轮换

Traefik 将在收到 USR1 信号后关闭并重新打开其日志文件,假设它们已配置.这允许外部程序(例如 logrotate)轮换和处理日志.

Traefik will close and reopen its log files, assuming they're configured, on receipt of a USR1 signal. This allows the logs to be rotated and processed by an external program, such as logrotate.

https://docs.traefik.io/v1.6/configuration/logs/#log-rotation

这篇关于如何为 traefik 启用 logrotation?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆