Knowledge Base

 View Only

Adjusting Size of Log Files

By Jama Software posted 01-29-2015 16:16


You can adjust the size or amount of log files kept. The default settings are 5mb per log file with 20 files kept at a time. 

You can change the size of the log files native to your tomcat folder by modifying the file. The location of the file will change depending on the version of Jama you are using. 

In Jama 8.0, the location  is: /data/log4jconfig/

In Jama 8.1, the location is: /data/config/

In this scroll near the bottom to the RollingFileAppender. To change the size, change the MaxFileSize to something larger than 5mb. To change the number of logs kept, change the MaxBackupIndex to something more than 20.

NOTE:  These instructions will work for any log such as JIRA sync log or the thread dump file. 

(Originally posted by Devon Lee)



07-19-2016 17:45

Hi Nick,

Thanks for working on this with me in a ticket. Since we got things figured out, I wanted to post the solution here. These are the changes we made to the file:

# Main log file  log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender  log4j.appender.logfile.File=${catalina.home}/logs/contour/contour.log  log4j.appender.logfile.DatePattern='.'yyyy-MM-dd-HH  log4j.appender.logfile.layout=org.apache.log4j.PatternLayout  log4j.appender.logfile.layout.ConversionPattern=%d %-5p %t %X{tenantId} %X{jamaFishTagLog} [%c] - %m%  #log4j.appender.logfile=org.apache.log4j.RollingFileAppender  #log4j.appender.logfile.MaxFileSize=50MB  #log4j.appender.logfile.MaxBackupIndex=20

In the process we learned the following:

  • The order of the entries is important. It is possible to use a slightly different order to the entries than the ones above but we know that particular order works.
  • Jama will not create 0 byte log files. This means if there are no log-able events in a particular hour, that hour's timestamp will be skipped and we will not get a separate log file for that time period. This means that it is not expected that you would always have 24 log files per day depending on the activity in Jama.

06-30-2016 20:59

Tried lowercase hh as well. Also found out for RollingFileAppender the attribute is filePattern, tried both formats with this as well and still no luck. submitted support ticket.

06-30-2016 20:51

Hi Nick,

I've been trying to test this for myself and am not having much luck either. One thing I did notice is that it looks like date pattern for hourly should be: '.'yyyy-MM-dd-HH. You've got lowercase hh. Could you give that a try? If that doesn't do the trick, let's move this to a ticket as it's going to take some time to track down. Let me know.



06-29-2016 17:52

Can you change the log rotation to rotate by hour? I tried to use DailyRollingFileAppender but that was not supported in 8.1. I tried to add an appender attribute of .DatePattern='.'yyyy-MM-dd-hh and that failed as well.