This week's book giveaway is in the Reactive Progamming forum. We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line! See this thread for details.
I put new log4j.xml in my application(is running under Weblogic 9.2), but my server weblogic does not read my log4j.xml. When I checked in the setDomainEnv.cmd file from bin, I found my JAVA CLASSPATH that point to some other log file, called apache....xml from WLI, it is something like this: -Dlog4j.configuration=%...%/apache ....xml
I tried to duplicate this command by adding the following row: -Dlog4j.configuration=.%....%/log4j.xml. But this does not work correctly, in fact the second line will override the first one, so the Weblogic will take into consideration only the second line, whether the first setting is still needed for the Weblogic Integration, so it should not be overridden.
The question is how should I configure in the classpath the log4j for my application, and still keeping the configuration that already exists?
and when I use logger.debug statement the statements are printing multiple times.
i.e when the same statement is first invoked it is printing one time. the next time, it is printing two times and so on.
I googled out and find to see that if I include
log4j.additivity.rootLogger=false in log4j.properties, then it will fix this issue.
But to my surprise it is not printing at all now.
Can someone please help?
This is the right forum
I think this article might help explain what is going on. By setting the additivity to false at the root level you're basically telling it not to log at all, you need to set the additivity at the package level you want to stop at, the article explains further.