title: How do you Change a Package's Log Level using Log4j?
body: <p>I've encountered the following bug:</p>
  
  <p><a href="http://issues.apache.org/jira/browse/AXIS2-4363" rel="noreferrer">http://issues.apache.org/jira/browse/AXIS2-4363</a></p>
  
  <p>It states the following:</p>
  
  <blockquote>
    <p>This error only occurs when log level
    for org.apache.axiom is DEBUG so a
    workaround is to set log level >
    DEBUG.</p>
  </blockquote>
  
  <p>My question is HOW do I go about doing that? I've been scouring my directories for a properties file or something and I've been looking to see if there was something I could set in code, but I really have no idea what I'm doing. I'm running a console app on my desktop right now while trying to get this to work. </p>
  
  <p>Update 1: I noticed that my Axis2 directory has its own log4j.properties file in its root. Is this safely ignored or is it part of the solution (or part of the problem)?</p>
  
  <p>Update 2: The root level log4j.properties file is apprently not set correctly. Right now it looks like this:</p>
  
  <pre><code>log4j.rootLogger=DEBUG, R 
  log4j.logger.org.apache.axiom=WARN
  log4j.appender.R=org.apache.log4j.RollingFileAppender 
  log4j.appender.R.MaxFileSize=10MB 
  log4j.appender.R.MaxBackupIndex=10 
  log4j.appender.R.layout=org.apache.log4j.PatternLayout 
  log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
  </code></pre>
  
  <p>but that is apparently wrong as this code returns "Log level is null":</p>
  
  <pre><code>System.out.println("Log level is " + logger.getLevel());
  </code></pre>
  
  <p>For now I am setting the log level in code using </p>
  
  <pre><code>Logger logger = Logger.getLogger("org.apache.axiom");
  logger.setLevel(Level.WARN);
  </code></pre>