[logback-user] Hi

Navin Math hinavinmath at gmail.com
Fri Jan 13 14:25:04 CET 2017

Hi Guys

This is my conf file for logging in the app. In my java application, I want
to display the exceptions in the file.
What are the changes required in the following configuration to display all
the e.printStackTrace() from the exception block whenever I get exception
in my Java program instead of displaying it on the console.


  <conversionRule conversionWord="coloredLevel"
converterClass="play.api.Logger$ColoredLevel" />

  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
      <pattern>%coloredLevel - %logger - %message%n%xException</pattern>

  <appender name="FILE" class="ch.qos.logback.core.FileAppender">
       <pattern>%date [%level] from %logger in %thread -

 <logger name="play" level="INFO" />
  <logger name="application" level="DEBUG" />

  <logger name="com.avaje.ebean.config.PropertyMapLoader" level="OFF" />
  <logger name="com.avaje.ebeaninternal.server.core.XmlConfigLoader"
level="OFF" />
  <logger name="com.avaje.ebeaninternal.server.lib.BackgroundThread"
level="OFF" />
  <logger name="com.gargoylesoftware.htmlunit.javascript" level="OFF" />

  <root level="ERROR">
    <appender-ref ref="STDOUT" />
  <root level="ERROR">
    <appender-ref ref="FILE" />

  <logger name="INFO" level="INFO">
        <appender-ref ref="FILE" />



On Fri, Jan 13, 2017 at 6:48 PM, Navin Math <hinavinmath at gmail.com> wrote:

> Can I ask my questions here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20170113/11177018/attachment.html>

More information about the logback-user mailing list