Announcement Announcement Module
No announcement yet.
Log4j config problem for spring and quartz related logs in websphere app server Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Log4j config problem for spring and quartz related logs in websphere app server

    Hi Experts,

    I am facing an Issue for log statements in Websphere with linux environment. The problem is..
    I configured the for my application so that I can capture the Spring and quartz related logs in file system. It works fine in my windows Websphere app server. But the same application when I deployed it on linux (HP ux) environment, the logs are getting displayed on server log (Just like System.out statements). I found that all quartz and spring related packages are getting added in to the 'Change Log Levels' as groups.

    If somebody tell me the reason why this is getting happened, I will pretty much thankful to them.

    Waiting for response..

    thanks and Regards,

  • #2
    Fix for this Issue


    At last I am able to fix this issue. I just created a file in my classes folder with the following entries. It works fine. I can able to capture all the third party library logs in external file system.



    • #3
      Supporting Documentation

      Thanks Sdama for your post! It helped me get though the same issue.

      I also had to change the "Classloader Mode" in Websphere to PARENT_LAST (PARENT_FIRST is default). This is needed because Websphere uses commons-logging and therefore it's in the root classloader.

      Here's some supporting documentation that backs up your solution to log via Log4j in Websphere. (go to "How Can I Use Log4j with Commons-Logging 1.1 on WebSphere 6.0?") (go to "Runtime Containers with Native JCL")

      Also, here's an alternative solution that wouldn't require changing the Classloader Mode in Websphere (although I didn't try it):



      • #4
        In my opinion it's a problem with mixing different logging methods in the same application or maybe even different versions of the same libraries.

        I do not remember fully but I think I had similar issue before. We decided then to not use commons-logging in our applications. We are using SLF4J instead and it works fine. All commons-logging jars has been removed from product archives.

        Indeed, issue was related to WebSphere 6 on mainframe (IBM Java 5). I'm not remember delailed versions.