title: Different Layouts for Log Levels in Log4j
body: <p>I am using Log4j and I want to log with different log levels.
  It would be nice, if I could use a custom Layout for every Log Level, or just have one logger that logs only the log message without any formatting.
  I don't really know how to do that, so I would be glad if any of you guys could give me some hints about it.</p>
  
  <p>Here's my log4j.properties:</p>
  
  <pre><code># Root Logger
  log4j.rootLogger=DEBUG, console, file
  
  # Appender to Console
  log4j.appender.console=org.apache.log4j.ConsoleAppender
  log4j.appender.console.layout=org.apache.log4j.PatternLayout
  log4j.appender.console.layout.ConversionPattern=[%p] - %m%n
  
  # Appender to Log-File
  log4j.appender.file=org.apache.log4j.RollingFileAppender
  log4j.appender.file.Append=false
  log4j.appender.file.File=adsync.log
  
  log4j.appender.file.layout=org.apache.log4j.PatternLayout
  log4j.appender.file.layout.ConversionPattern=[%p] %d{yyyy-MM-dd HH:mm:ss} - %m%n
  </code></pre>