简体   繁体   中英

Application logging at profile level in Websphere 8.5

Websphere 8.5 - I have a cluster set up on 2 nodes and two servers on each node, a total of 4 Server JVMs. An application is deployed on cluster, so basically runs on all 4 servers.

As per IBM WAS8.5, my application logs should come at all 4 server logs location as 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 being generated at 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 have only 2 sets of logs, instead of 4 set of logs. Is there any configuration so that application logs gets generated at server level? This would help me analyze which server is serving the outside 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

By specifying File as "firm-cda.log" without a directory, the log file will be created in the current working directory, which is by default PROFILE_HOME rather than the server logs directory. If you want the file to reliably appear alongside the other server logs, you'll need to specify a directory. Since log4j supports variables, you could use File=${my.log4j.dir}/firm-cda.log and then define a JVM "custom" (system) property named my.log4j.dir in the WAS configuration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM