cronolog is a simple filter program that reads log file entries from standard input and writes each entry to the output file specified by a filename template and the current date and time. When the expanded filename changes, the current file is closed and a new one opened. cronolog is intended to be used in conjunction with a Web server, such as Apache, to split the access log into daily or monthly logs.
1.安装cronolog //Log file rotator
sudo yum install -y cronolog
CustomLog “|/usr/sbin/cronolog /var/log/httpd/talk_access.%Y%m%d.log combined
ErrorLog “|/usr/sbin/cronolog /var/log/httpd/talk_error.%Y%m%d.log