Changing log files frequency
Applicable Product:
- PeopleFluent Learning
Applicable Release:
- V21
- 11.x
Summary:
Changing log files to daily/ weekly/ monthly
Keywords:
logs frequency
If you want to configure the log rotation period where the new log can start on each day/week/month, you may add the following parameter on ekp.properties:
system.LogNameIsDateBased=true
This setting will give a date-based log file name e.g mail-2013-06-16.log, also configure the log4j.properties if for daily log rotation:
log4j.appender.ekp=org.apache.log4j.DailyRollingFileAppender
This settings is that logging for the current day ends up in a log file called ekp.log, then when a day arrives and EKP/NTS tries to put an entry into the log file, it will first rename ekp.log to something like ekp.log.2009-03-22 and then create a new ekp.log to write into. Each log file would then contain entries that belong to that particular day. If a day had no logging activities, there would be no log file for that day. By default, log rotation is on a daily basis. It's possible to make the rotation monthly or weekly through the following log4j.properties configuration..
Monthly:
log4j.appender.ekp.DatePattern='.'yyyy-MM
Weekly:
log4j.appender.ekp.DatePattern='.'yyyy-ww
After applying the parameter please restart tomcat for the changes to take effect.