tag:blogger.com,1999:blog-5552322557063399878.post558907739337363734..comments2023-05-31T05:59:44.787-07:00Comments on Jeffrey Phillips Blog: Configuring Web Logic 10.3.5 and log4j for your Java Applicationphillips4jchttp://www.blogger.com/profile/11824840333171936017noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-5552322557063399878.post-54630939000646014932014-04-29T22:53:17.480-07:002014-04-29T22:53:17.480-07:00Program level comment is missing in this please fi...Program level comment is missing in this please find correct one<br /><br />Configuring log4j for your Java Application for Web Logic 10.3.6.0 <br />Server side Configurations<br />1. Copy wllog4j.jar from your WebLogic server/lib directory and place it in your domain_root/lib folder. – <br /> example : /u01/oracle/Oracle/Middleware/user_projects/domains/gl_domain/lib<br />2. Copy your version of log4j.jar to your domain_root/lib folder.<br /> example : /u01/oracle/Oracle/Middleware/user_projects/domains/gl_domain/lib<br />We used log4j-1.2.17.jar in the project<br />3. Copy your log4j.xml to your domain_root folder. <br />4. <br /><br />5. (Linux)Edit the setDomainEnv.sh file in the domain_root/bin directory. and find the following code:<br /><br /><br />if [ "${LOG4J_CONFIG_FILE}" != "" ] ; then<br /> JAVA_PROPERTIES="${JAVA_PROPERTIES} -Dlog4j.configuration=file:${LOG4J_CONFIG_FILE}"<br /> export JAVA_PROPERTIES<br />fi<br /><br />Insert the following above those lines of code(replacing the path with the one for your system's domain_root directory:<br /><br />LOG4J_CONFIG_FILE=”/u01/app/oracle/middleware/user_projects/domains/base_domain/log4j.xml”<br />Export LOG4J_CONFIG_FILE<br /><br />example : /u01/oracle/Oracle/Middleware/user_projects/domains/gl_domain/log4j.xml<br />6. Login to weblogic server console. Go to Servers -> Admin Server-> Logging. Click on advanced mode. Change the logging implementation from JDK to Log4J. Click save. (As shown in screenshots below)<br /><br /><br /><br /><br /><br /><br />7. Activate changes. Re-start the admin server.<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Program level Addon<br /><br />1. Place the log4j configuration file in server and provide that info in below mentioned way in Java program.<br />PropertyConfigurator.configure("/home/SOA_LOG_CONFIG_DIR/test_log4j.properties");Murali Bollavaramhttps://www.blogger.com/profile/02670352794734565623noreply@blogger.comtag:blogger.com,1999:blog-5552322557063399878.post-84050463710842981052013-01-24T17:36:19.686-08:002013-01-24T17:36:19.686-08:00Thank you very much for the post. I have been look...Thank you very much for the post. I have been looking for this everywhere.. Good karma for you my man.mynamhttps://www.blogger.com/profile/16951677970659134415noreply@blogger.comtag:blogger.com,1999:blog-5552322557063399878.post-9968152705959781152013-01-21T06:49:09.847-08:002013-01-21T06:49:09.847-08:00Hello
That's very good tutorial. But i have a...Hello<br /><br />That's very good tutorial. But i have a quesion- in my organization we have 3 separate applications deployed to weblogic 10.3.5.0<br />and we need 3 different log files, one for each application. How can i make it, if in log4j.xml i have only one parameter with path?<br /><br />Thanks<br />MatAnonymoushttps://www.blogger.com/profile/11863374722299610357noreply@blogger.comtag:blogger.com,1999:blog-5552322557063399878.post-55573489212121786912012-12-23T23:28:11.403-08:002012-12-23T23:28:11.403-08:00Thanks really working for me .Thanks really working for me .Kaushal Pandyahttps://www.blogger.com/profile/08424911888715802901noreply@blogger.comtag:blogger.com,1999:blog-5552322557063399878.post-58527489999691878862012-08-14T07:53:18.847-07:002012-08-14T07:53:18.847-07:00Thank you for this post. This configuration worked...Thank you for this post. This configuration worked.Anonymousnoreply@blogger.com