title: How to set a default log level in log4j.properties?
body: <p>As far as I understand it, in log4j.properties you specify what log levels to <em>let through</em> and for single cases you can restrict it further. However, I want to restrict it for all cases and be more unrestrictive in single cases. The way I tried it (see below, by setting the root logger level to error) I only get error messages but how can I express to only use ERROR as a <em>default level</em>, in case nothing else is specified?</p>
  
  <pre><code>log4j.appender.stdout=org.apache.log4j.ConsoleAppender
  log4j.appender.stdout.Target=System.out
  log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
  log4j.appender.stdout.layout.ConversionPattern=%m%n
  log4j.appender.stdout.threshold=DEBUG
  
  log4j.rootLogger=ERROR,stdout
  
  # everything else should be ERROR
  org.mypackage=DEBUG
  org.verbosepackage=OFF
  </code></pre>
  
  <p><strong>Solution</strong>
  I'm sorry, I just noticed, that I forgot the "log4j.logger." in front of the packages. With it, it really works. Thanks everyone!</p>