我想用logrotate来创build名称很好的文件。 有什么办法来强制一些轮换后的名称模式? 我想创build一个service-{year}-{month}-{day}-{hour}格式并按小时旋转。
看来我正在运行与dateext版本,但没有dateformat 。 我想要使用这种logging方式。
logrotateconfiguration文件:
dateext dateformat -%Y-%m-%d-%s
date:
atop.log-2010-09-30-1285850549
小时不受支持。 你可以使用postrotate重命名。