5 Replies Latest reply: Feb 18, 2010 10:57 PM by Jay SenSharma MiddlewareMagic RSS

    log4j configuration in weblogic

      How to configure WebLogic to send logs to syslog daemon. I am using weblogic 10.0.
        • 1. Re: log4j configuration in weblogic
          Jay SenSharma MiddlewareMagic

          U can try putting ther "log4j.properties" file in Server Classpath:

          log4j.logger.syslog =DEBUG, syslogApp
          # Appender configuration

          From Admin Console click on "your_Domain_name"--->Configuration--->Logging--->(Advanced options)-->Logging implementation: Log4J

          restart your Server....Just check whether it is working for you or not?

          Jay SenSharma
          http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

          Edited by: Jay SenSharma on Feb 11, 2010 1:40 PM
          • 2. Re: log4j configuration in weblogic
            Thanks , it is working.
            • 4. Re: log4j configuration in weblogic
              Hi Jay,

              I was trying to configure log4j on weblogic 10. Do we need to put any jar file for log4j. Because i am getting below error while starting server after following the steps u have given.

              <Feb 18, 2010 10:35:49 AM PST> <Error> <Log Management> <BEA-170022> <Log4j fail
              ed to initialize for TestDomain. The default JDK Logging implementation will be
              java.lang.ClassNotFoundException: weblogic.logging.log4j.JDKLog4jAdapterFactory
              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
              Truncated. see log file for complete stacktrace

              Thank You,
              • 5. Re: log4j configuration in weblogic
                Jay SenSharma MiddlewareMagic
                Hi Raj,

                I am surprised that the Missing class is "weblogic.logging.log4j.JDKLog4jAdapterFactory" which is available in "wllog4j.jar" ...which should be loaded automatically in the Server classpath because it is in "<BEA_HOME>\<WL_HOME\>server\lib\wllog4j.jar".

                Please try putting this Jar file (wllog4j.jar) in the Domain lib directory...(Better if you put log4j.jar also here)
                In my case i have placed it in: C:\bea103\user_projects\domains\7001_Domain\lib

                Jay SenSharma

                Edited by: Jay SenSharma on Feb 19, 2010 10:26 AM