logrotate对日志切换

logrotate 是系统自带进行对日志进行处理
其配置文件
 /etc/logrotate.conf

  /etc/logrotate.d

  其中,/etc /logrotate.conf是主要配置文件,/etc/logrotate.d中的文件会被/etc/logrotate.conf读取。如果您在 /etc/logrotate.d中的配置文件没有规定具体的参数,则这些参数由/etc/logrotate来决定。logrotate是按计划运行的。


可以配置rails log 。其相关插件有logrotate_filename
     http://github.com/Pr0d1r2/logrotate_filename/
可以学习一下。
好多插件都是封装系统底层方法,自己也想想啊,看看怎么作一些有用的插件

猜你喜欢

转载自guodongbuding.iteye.com/blog/584734