Log4j two-ear logging issue in Weblogic

I deploy 2 ears in Weblogic 10, A and B. In both of them I have a log4j.properties file. At startup, when the first ear is loaded, the logs are in the right “A.log” file, but when the second ear is loaded, all the logs go to the “B.log” file, even the logs associated with the first ear. Did I miss something ... any idea?

thank

Edit / Solution: Loader issue. Add to weblogic-application.xml:

<wls:prefer-application-packages> <wls:package-name>org.apache.log4j.*</wls:package-name> </wls:prefer-application-packages>

All to everyone :)

+3
source share
2 answers

I would suggest that the log4j library used by the Weblogic server is used in your web applications.

, - , loade Weblogic.

- log4j, ( Weblogic, WebSphere " : first/parent last '), .

+2

, , :

1) , log4j.
2) , .properties ,   ( EAR)

0

Source: https://habr.com/ru/post/1763773/


All Articles