title: Different log levels in different places
body: <p>I have a bunch of classes in <code>com.example</code>.  I want my logfile to capture debug logging and my console to capture info only.  </p>
  
  <p>I am using log4j2.</p>
  
  <p>Here is my log4j2.properties file.</p>
  
  <pre><code>name=PropertiesConfig
  property.filename = logs
  
  # configure both the appenders 
  # CONSOLE APPENDER
  appender.console.type = console
  appender.console.name = consoleAppender
  appender.console.layout.type = PatternLayout
  appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%t] %c{1} - %msg%n
  
  # LOGFILE appender
  appender.logfile.type = File
  appender.logfile.name = logfileAppender
  appender.logfile.fileName=extract.log
  appender.logfile.layout.type=PatternLayout
  appender.logfile.layout.pattern=[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
  
  logger.example.name = com.example
  logger.example.level = debug
  logger.example.additivity = true
  logger.example.appenderRef.logfile.ref = logfileAppender
  logger.example.appenderRef.console.ref = consoleAppender
  
  # configure the loggers, starting from the root logger.
  rootLogger.level = info
  </code></pre>
  
  <p>Which logs to debug at both.</p>
  
  <p>I try this...</p>
  
  <pre><code>name=PropertiesConfig
  property.filename = logs
  
  # configure both the appenders 
  # CONSOLE APPENDER
  appender.console.type = console
  appender.console.name = consoleAppender
  appender.console.layout.type = PatternLayout
  appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%t] %c{1} - %msg%n
  
  # LOGFILE appender
  appender.logfile.type = File
  appender.logfile.name = logfileAppender
  appender.logfile.fileName=extract.log
  appender.logfile.layout.type=PatternLayout
  appender.logfile.layout.pattern=[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
  
  logger.example.name = com.example
  logger.example.level = debug
  logger.example.additivity = true
  logger.example.appenderRef.logfile.ref = logfileAppender
  
  logger.info.name = com.example
  logger.info.level = info
  logger.info.additivity = true
  logger.info.appenderRef.console.ref = consoleAppender
  
  # configure the loggers, starting from the root logger.
  rootLogger.level = info
  </code></pre>
  
  <p>But then nothing logs to console.</p>
  
  <p>any ideas?  </p>