Hi All, I got a strange behavior when i deploy my application that define the log4j.xml configuration to existing App.Server (say it IBM WAS v6.1) then other application's log that already use their own log file for example App A log to A.log, App B log to B.log will suddenly redirect to SystemOut.log and no longer to their respective logs file.
But when i undeploy my application from the App Server, then other application's log file come back to normal. Below is my log4j.xml configuration : <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <!-- Appenders --> <appender name="console" class="org.apache.log4j.ConsoleAppender"> <param name="DatePattern" value="'.'yyyy-MM-dd"/> <param name="Append" value="true"/> <param name="Threshold" value="debug"/> <param name="Target" value="System.out" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p:%d:%c{1} [%x] - %m%n" /> </layout> </appender> <appender name="my_file_a_log" class="org.apache.log4j.DailyRollingFileAppender"> <param name="File" value="my_file_a_log.log"/> <param name="DatePattern" value="'.'yyyy-MM-dd"/> <param name="Append" value="true"/> <param name="Threshold" value="debug"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p:%d:%c{1} [%x] - %m%n" /> </layout> </appender> <logger name="mycom.mypackage.ClassMyClass" additivity="false"> <level value="info" /> <appender-ref ref="my_file_a_log" /> </logger> <root> <priority value="warn" /> <appender-ref ref="console" /> </root> </log4j:configuration> Is it correct? Am i missing something? My other question is why other application is affected to my log4j.xml configuration? I though every application inside the App.Server will have their own respective configuration? Please help me. your help is really appreciated. regards, Lanes
