Split the catalina. out file in linux, which is generated as a file by nature. linuxcatalina. out
1. Download tool cronolog compressed package (http://download.csdn.net/detail/sunling_sz/8144469)
2. Drag and Drop the file to the server. Any directory can be used.
3. Go to the installation directory of cronolog
# Cd cronolog-1.6.2
4. Run and install
#./Configure
# Make
# Make install
5. Check the directory where cronolog is installed (verify that the installation is successful)
# Which cronolog
Usually:/usr/local/sbin/cronolog
--------------------------------------------------------------------
To split catalina. out of tomcat, you need to do the following:
Modify
1. Set
If [-z "$ CATALINA_OUT"]; then
CATALINA_OUT = "$ CATALINA_BASE"/logs/catalina. out
Fi
Change
If [-z "$ CATALINA_OUT"]; then
CATALINA_OUT = "$ CATALINA_BASE"/logs/catalina. out. % Y-% m-% d
Fi
2. Comment out touch "$ CATALINA_BASE"/logs/catalina. out
3. Set
Org. apache. catalina. startup. Bootstrap "$ @" start \
> "$ CATALINA_BASE"/logs/catalina. out 2> & 1 &
Change
Org. apache. catalina. startup. Bootstrap "$ @" start 2> & 1 \
|/Usr/local/sbin/cronolog "$ CATALINA_OUT">/dev/null &
Save and restart tomcat.