This discussion is archived
2 Replies Latest reply: Aug 30, 2012 7:46 AM by Patrick Taylor RSS

LOG4J Logging

wesley.d.gibbs Newbie
Currently Being Moderated
We have a clustered environment, with a nodemanager, and 2 managed servers. Right now the log files (MS1.out and MS2.out) for the managed servers are filling up very quickly. In about 6 days, each of these files will be about 2GBs in size. In the files there is log4j debug output statements that look to be the biggest cause of the large file size. This Java application is deployed in WebLogic as an ear file, there are log4j debug statements written throughout the application to help with debugging (meant for development and training environments). These are the debug statements that I'm seeing in these two (MS1.out and MS2.out) files on our production environment.

I want to change the level of logging from DEBUG to WARN in this production environment so I don't see this in the MS1.out and MS2.out files. The problem is that I've been changing this DEBUG to WARN in several places within the weblogic directory and I can't seem to find the right file, so that this change actually takes place, so I don't see these debug statements in the MS1.out and MS2.out files.

How do I determine which log4.xml or log4j.properties is the root cause? How can I find out which log4j.xml or log4j.properties takes precedence?

I have changed this setting of DEBUG to WARN in a log4j.xml file within the nodemanager directory, but after saving the file with my changes, it gets over-written after I stop and start the managed server with it's previous setting of DEBUG. I don't understand why this log4j.xml file is getting over-written with the old settings.
  • 1. Re: LOG4J Logging
    Kalyan Pasupuleti-Oracle Expert
    Currently Being Moderated
    check for following link.

    http://download.oracle.com/docs/cd/E21764_01/apirefs.1111/e13941/weblogic/logging/log4j/Log4jLoggingHelper.html.

    Regards,
    kal
  • 2. Re: LOG4J Logging
    Patrick Taylor Pro
    Currently Being Moderated
    You can set the log4j log level setting in the weblogic console.

    Browse to Home > Server > managed server > Logging Tab > Advanced
    Set the severity level to Warning for standard out.

    Repeat this for each managed server and this should resolve the issue.

    Thanks,
    Patrick

    It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    https://forums.oracle.com/forums/ann.jspa?annID=893

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points