Is there a way to limit the file size of the std.out or the catalin.out files?

There is no way to limit the size of std.out or catalina.out files within Yellowfin, as this is controlled by Tomcat, but there are potential solutions for this. 

1. From within Yellowfin, there is simply no parameter to set the size of the file itself.

However, you can limit the amount of information logged to these file/s (which will still be logged in the Yellowfin.log).

To limit the logging, edit the log4j.properties file located under Yellowfin\appserver\webapps\WEB-INF and then remove "cons" from the code excerpt below.

# Set the default logging level to INFO, and log to console and application log file log4j.rootCategory=INFO, cons, applog

Example:

# Set the default logging level to INFO, and log to console and application log file log4j.rootCategory=INFO, applog

By doing the above, Yellowfin data will not be logged into these files, though this information should still be logged within the Yellowfin.log file.

2. Another option would be to do something like the following (note this particular example is specific to Linux, but there there are likely similar possibilities there as well with some third party software like 7z, batch command and the task scheduler):

You can, for example, add the file tomcat to /etc/logrotate.d/ and perform something like:

/../appserver/logs/catalina.out {
copytruncate
daily
rotate 7
compress
missingok
size 100M
}r/sbin/logrotate /etc/logrotate.conf

This results in an output like this:

/984fbec21497168b0e48be2a10e5f315

At which point, the file can't 'explode' in size anymore as it will be limited to 7 files of 100MB and will cycle through this 7, meaning you will eventually lose data as file 8 comes around after 700MB of logging data, which will then replace the oldest log file.

Is this article helpful?
0 0 0