The log of Tomcat5 under WIN is recorded in date. Move to Linux and find only one Catalina.out under Tomcat / Logs.
Time is long. It is found that the log file is inclined. It is not convenient for management.
If you can record it as a date on Tomcat under WIN. Thinking I want to use cron to split the log file.
Try it.
First google .cronolog-1.6.2.tar.gz
1. Download cronolog-1.6.2.tar.gz
2. Installation
# TAR zxvf cronolog-1.6.2.tar.gz # ./configure# make # make install
Get it!
The default is installed in / usr / local / sbin /.
3. Configuration
Focus is coming. Pay attention !!!
Locate org.apache.catalina.startup.bootstrap "$ Catalina_base" /logs/catalina.out 2 & 1 & 1 & 1 & 1 & 1
Change the above content: org.apache.catalina.startup.bootstrap "$ @" start | / usr / local / sbin / cronolog $ "catalina_base" logs / catalina.out.% Y-% M-% D >> / DEV / NULL 2 & 1 & 1 & 1 & 1
Modify it. Restart
#. / catalina.sh start
Now look at the labor results.
# ls / tomcat / logs /
It will be found that there are several files below CataLina 2.2006.06.01.log.