title: How to configure log4j2.properties file for log4j2 to have a logger with 2 appenders with different levels?
body: <p>Can anyone help me, I have tryied so hard to make it work but I didn't succeed
  here is my configuration file</p>
  
  <pre><code>name=PropertiesConfig
  appenders = console, file
  
  appender.console.type = Console
  appender.console.name = STDOUT
  appender.console.layout.type = PatternLayout
  appender.console.layout.pattern = [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
  
  appender.file.type = File
  appender.file.name = LOGFILE
  appender.file.fileName=logs/propertieslogs.log
  appender.file.layout.type=PatternLayout
  appender.file.layout.pattern=[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
  
  
  loggers=logfile
  logger.logfile.name=com.mycompany.pack
  logger.logfile.level = error
  
  logger.logfile.appenderRef.file.ref = LOGFILE
  logger.logfile.appenderRef.console.ref = STDOUT
  </code></pre>
  
  <p>how can I set two different levels for appenders, for example, in console to display only from info and above and for file to display only from error and above?</p>