How to customize logs of in TIBCO BusinessWorks ProcessMonitor (BWPM) for no more than five server.log files with a 100 KB max size.

How to customize logs of in TIBCO BusinessWorks ProcessMonitor (BWPM) for no more than five server.log files with a 100 KB max size.

book

Article ID: KB0093072

calendar_today

Updated On:

Products Versions
TIBCO BusinessWorks ProcessMonitor -
Not Applicable -

Description

Description:
TIBCO BusinessWorks ProcessMonitor (BWPM) server will write log information to the BWPM Server logfile located at <TOMCAT_WEBAPPS>\bwpm\WEB-INF\logs\bwpm.log.

By default, server.logs are rolled on a daily basis and there is no any limit on log file size. You can change all aspects of the log file using the log4j.properties file located at <TOMCAT_WEBAPPS>\bwpm\WEB-INF\data}log4j.properties to customize server.logs as per your requirement.

Issue/Introduction

How to customize logs of in TIBCO BusinessWorks ProcessMonitor (BWPM) for no more than five server.log files with a 100 KB max size.

Resolution

TIBCO BusinessWorks ProcessMonitor (BWPM) uses DailyRollingFileAppender, so it creates server.logs on daily basis. For your requirements you have to use RollingFileAppender and you need to set MaxBackupIndex to four (as you need five files) and MaxFileSize to 100KB.

Change log4j.appender.MeinDaRoFiAppender=org.apache.log4j.DailyRollingFileAppender to log4j.appender.MeinDaRoFiAppender=org.apache.log4j.RollingFileAppender and add the following properties in the log4j.properties file.

log4j.appender.MeinDaRoFiAppender.MaxBackupIndex=4
log4j.appender.MeinDaRoFiAppender.MaxFileSize=100KB

The log4j.properties file will look like the following once the changes. are made You need to restart the BWPM/Tomcat server for the changes to log4j.properties to take effect.


***********************

#Wed Jun 17 17:08:09 IST 2015
log4j.appender.MeinConsoleAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.DbMigrationAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.MeinDaRoFiAppender.MaxBackupIndex=4
log4j.appender.DbMigrationAppender.datePattern='.'yyyy-MM-dd
log4j.logger.dbInstallLogger=INFO,DbInstallationAppender
log4j.appender.MeinConsoleAppender=org.apache.log4j.ConsoleAppender
log4j.appender.DbInstallationAppender.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c\: %m%n
log4j.appender.DbInstallationAppender=org.apache.log4j.FileAppender
log4j.logger.dbMigrationLogger=INFO,DbMigrationAppender
log4j.appender.DbMigrationAppender.file=${rootPath}/WEB-INF/logs/migration.log
log4j.appender.MeinDaRoFiAppender.MaxFileSize=10KB
log4j.appender.MeinConsoleAppender.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c\: %m%n
log4j.appender.MeinDaRoFiAppender=org.apache.log4j.RollingFileAppender
log4j.appender.MeinDaRoFiAppender.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c\: %m%n
log4j.appender.MeinDaRoFiAppender.file=${rootPath}/WEB-INF/logs/Edshaniserver.log
log4j.appender.MeinDaRoFiAppender.datePattern='.'yyyy-MM-dd
log4j.appender.DbInstallationAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.DbInstallationAppender.file=${rootPath}/WEB-INF/logs/installation.log
log4j.appender.DbMigrationAppender=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MeinDaRoFiAppender.layout=org.apache.log4j.PatternLayout
log4j.rootLogger=TRACE,MeinDaRoFiAppender
log4j.appender.DbMigrationAppender.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c\: %m%n

***********************

Additional Information

TIBCO BusinessWorks ProcessMonitor (BWPM) Server Administration Guide>System Management>Logging