How to configure the size of EM.log?
search cancel

How to configure the size of EM.log?

book

Article ID: 69429

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) INTROSCOPE

Issue/Introduction

The EM.log is just a redirection of standard out & standard error when the EM is started with EM_HOME/bin/EMCtrl.sh. Its size is not controlled by any of the log4j properties in the EM properties file so the em.log will grow unlimited.

How to roll Introscope Enterprise Manager Log files including EM.log based on date and size?

Environment

  • Application Performance Management from 10.7

Resolution

These are the properties used to roll the logs by date.

log4j.appender.logfile=com.wily.org.apache.log4j.DailyRollingFileAppender
log4j.appender.logfile.DatePattern='.'yyyy-MM-dd-HH-mm

To roll the logs by size:

log4j.appender.logfile=com.wily.org.apache.log4j.RollingFileAppender
log4j.appender.logfile.MaxBackupIndex=4
log4j.appender.logfile.MaxFileSize=200MB

Procedure:

1. Stop the Introscope Enterprise Manager.Remove all the log files inside logs folder.

2. Then set the properties as given below inside IntroscopeEnterpriseManager.properties:

log4j.appender.logfile=com.wily.org.apache.log4j.DailyRollingFileAppender
log4j.appender.logfile.DatePattern='.'yyyy-MM-dd-HH-mm

log4j.appender.logfile=com.wily.org.apache.log4j.RollingFileAppender
log4j.appender.logfile.MaxBackupIndex=4
log4j.appender.logfile.MaxFileSize=100KB

3. Start the EM and generate log to reach 100KB then look at the log files.

You will see the date appended log file names.

Additional Information

Please note that by rolling over the logs at a smaller size, any problem that comes up may be overwritten quickly.  So please keep this in mind, should you encounter an issue that you need to be troubleshooted, its best to temporarily increase the log file size so that Support can quickly ascertain the situation.

See links below for more information: 

By Using "RollingFileAppender"

By Using "DailyRollingFileAppender"