Openfire Log4j configuration

I am using

Openfire 3.10.2

CentOS 6.4

JDK 1.7.0_71

I would like to setup log rotation in such a way that it will rollover every midnight regardless of the size, I would like to maintain a week of log in the system at any given time

Openfire uses Log4j. It’s configuration file can be found in the lib directory. You can change this file as you want (please note that this can affect the functionality in the Admin Console where users can view the log files).

Please refer to log4j documentation to configure the logs in the exact way you’d like to have them. This looks promising: DailyRollingFileAppender - Logging-log4j Wiki