Registering applications at the profile level in Websphere 8.5
Websphere 8.5 - I have a cluster configured with 2 nodes and two servers per node, for a total of 4 Server JVMs. The app is deployed to a cluster, so it mostly runs on all 4 servers.
As with IBM WAS8.5, my application logs should go to all 4 server log locations as shown below,
[WAS_HOME]\profiles\[PROFILE_1]\logs\[SERVER_1]\
[WAS_HOME]\profiles\[PROFILE_1]\logs\[SERVER_2]\
[WAS_HOME]\profiles\[PROFILE_2]\logs\[SERVER_3]\
[WAS_HOME]\profiles\[PROFILE_2]\logs\[SERVER_4]\
but it is generated at the profile level
Server 1 and 2 write at [WAS_HOME]\profiles\[PROFILE_1]\
Server 3 and 4 write at [WAS_HOME]\profiles\[PROFILE_2]\
I only have 2 sets of logs, not 4 sets of logs. Is there any configuration to have application logs generated at the server level? This will help me analyze which server is serving external requests.
EDIT: log4j.properties -
log4j.logger.cdamdb=DEBUG, cdaFileLog
log4j.additivity.cdamdb=false
log4j.appender.cdaFileLog=org.apache.log4j.RollingFileAppender
log4j.appender.cdaFileLog.File=<nopath>firm-cda.log
log4j.appender.cdaFileLog.MaxFileSize=25MB
log4j.appender.cdaFileLog.MaxBackupIndex=2
source to share
By specifying the file as "firm-cda.log" without a directory, the log file will be created in the current working directory, which by default is the PROFILE_HOME file and not the server log directory. If you want the file to reliably appear alongside other server logs, you need to specify the directory. Since log4j supports variables, you can use File=${my.log4j.dir}/firm-cda.log
and then define the JVM a "custom" (system) named property my.log4j.dir
in the WAS configuration.
source to share