Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

logback.xml

By: a guest on Jan 29th, 2013  |  syntax: None  |  size: 3.58 KB  |  views: 3  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <configuration debug="true">
  2.         <!--
  3.                 See http://logback.qos.ch/manual/ for more information on how to
  4.                 configure the Logback logging engine.
  5.                 Available levels: ALL < TRACE < DEBUG < INFO < WARN < ERROR < OFF
  6.         -->
  7.  
  8.         <!--
  9.                 Let PMS decide the path for the logfile: either the current directory
  10.                 or (when that is read only) the system temp directory.
  11.         -->
  12.         <define name="debugLogPath" class="net.pms.logging.DebugLogPathDefiner" />
  13.  
  14.         <!-- Appender for messages in the PMS "Traces" tab -->
  15.         <appender name="traces" class="net.pms.logging.FrameAppender">
  16.                 <!-- Only log INFO and higher -->
  17.                 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
  18.                         <level>INFO</level>
  19.                 </filter>
  20.  
  21.                 <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
  22.                         <pattern>%-5level %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %msg%n</pattern>
  23.                 </encoder>
  24.         </appender>
  25.  
  26.         <!-- Appender for the console -->
  27.         <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
  28.                 <!-- Only log INFO and higher -->
  29.                 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
  30.                         <level>INFO</level>
  31.                 </filter>
  32.                 <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
  33.                         <pattern>%-5level %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %msg%n</pattern>
  34.                 </encoder>
  35.         </appender>
  36.  
  37.         <!--
  38.                 Appender for the debug.log that will keep the file growing in size
  39.                 until PMS is restarted.
  40.         -->
  41.         <appender name="debug.log" class="ch.qos.logback.core.FileAppender">
  42.                 <!-- No threshold filtering, log everything the root logger allows -->
  43.                 <file>${debugLogPath}${file.separator}debug.log</file>
  44.                 <append>false</append>  <!-- Start new debug.log on each application start -->
  45.                 <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
  46.                         <pattern>%-5level %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %msg%n</pattern>
  47.                 </encoder>
  48.         </appender>
  49.  
  50.         <!--
  51.                 Appender for the debug.log that will roll the debug.log file after 10 MBytes
  52.                 and will keep a maximum of 5 old and compressed logs.
  53.         -->
  54.         <appender name="debug.log.10MB" class="ch.qos.logback.core.rolling.RollingFileAppender">
  55.                 <!-- No threshold filtering, log everything the root logger allows -->
  56.                 <file>${debugLogPath}${file.separator}debug.log</file>
  57.                 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
  58.                         <fileNamePattern>${debugLogPath}debug.log.%i.zip</fileNamePattern>
  59.                         <minIndex>1</minIndex>
  60.                         <maxIndex>5</maxIndex>
  61.                 </rollingPolicy>
  62.                 <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
  63.                         <maxFileSize>10MB</maxFileSize>
  64.                 </triggeringPolicy>
  65.                 <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
  66.                         <pattern>%-5level %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %msg%n</pattern>
  67.                 </encoder>
  68.         </appender>
  69.  
  70.         <!--
  71.                 For debugging purposes it can be handy to define custom levels for
  72.                 specific classes or packages. For example:
  73.  
  74.         <logger name="net.pms.dlna.DLNAResource" level="ALL" />
  75.         <logger name="net.pms.network.RequestHandlerV2" level="ALL" />
  76.         <logger name="net.pms.util" level="ALL" />
  77.         -->
  78.  
  79.         <!-- silence noise from external libraries -->
  80.         <logger name="org.apache" level="WARN" />
  81.         <logger name="httpclient.wire" level="WARN" />
  82.  
  83.         <!-- Root logger defines the minimum log level for all loggers -->
  84.         <root level="TRACE">
  85.                 <appender-ref ref="traces" />
  86.                 <appender-ref ref="console" />
  87.  
  88.                 <!--
  89.                         If unlimited growth of debug.log is not desired use the
  90.                         appender-ref "debug.log.10MB" instead of "debug.log".
  91.                 -->
  92.                 <appender-ref ref="debug.log" />
  93.                 <!-- <appender-ref ref="debug.log.10MB" /> -->
  94.         </root>
  95. </configuration>