linux环境 :centos 6.7 cronolog版本cronolog-1.6.2

安装cronolog
下载好安装包(https://files.cnblogs.com/files/crazyzero/cronolog-1.6.2.tar.gz)

[root@zero tools]# wget https://files.cnblogs.com/files/crazyzero/cronolog-1.6.2.tar.gz
[root@zero tools]# ll cronolog-1.6.2.tar.gz
-rw-r--r-- 1 root root 133591 8月 25 2017 cronolog-1.6.2.tar.gz
减压并进入

[root@zero tools]# tar xf cronolog-1.6.2.tar.gz
[root@zero tools]# cd cronolog-1.6.2
编译安装

[root@zero cronolog-1.6.2]# ./configure
[root@zero cronolog-1.6.2]# make
[root@zero cronolog-1.6.2]# make install
生成cronolog工具

[root@zero cronolog-1.6.2]# ll /usr/local/sbin/cronolog
-rwxr-xr-x 1 root root 40446 8月 11 11:55 /usr/local/sbin/cronolog
cronolog语法

CustomLog "|/usr/local/sbin/cronolog /web/apache/logs/roth-access_%Y%m%d.log"
实际使用


ServerAdmin [email protected]
DocumentRoot "/var/html/roth"
ServerName www.roth.com
ErrorLog "logs/roth-errorlog"
CustomLog "|/usr/local/sbin/cronolog /web/apache/logs/roth-access
%Y%m%d.log" common

https://www.cnblogs.com/crazyzero/p/7435691.html