Permalink
Browse files

sync logback.headless.xml with logback.xml (thanks, Mug)

  • Loading branch information...
1 parent 02e2959 commit aed9e6ff64e83a25d65a18f82c459f37d71fa3ce @chocolateboy chocolateboy committed Sep 13, 2012
View
2 src/main/external-resources/PMS.conf
@@ -495,7 +495,7 @@ mencoder_encode =
# ---< Misc options >---------------------------------------------------------
-# Definitely disable subitles
+# Definitely disable subtitles
# ---------------------------
# GUI Option: Definitely disable subtitles (toggle)
# Default: false.
View
62 src/main/external-resources/logback.headless.xml
@@ -1,43 +1,46 @@
<configuration debug="true">
- <!-- See http://logback.qos.ch/manual/index.html for more information -->
- <!-- on how to configure the Logback logging engine. -->
- <!-- Available levels: ALL < TRACE < DEBUG < INFO < WARN < ERROR < OFF -->
+ <!--
+ See http://logback.qos.ch/manual/ for more information on how to
+ configure the Logback logging engine.
+ Available levels: ALL < TRACE < DEBUG < INFO < WARN < ERROR < OFF
+ -->
+ <!--
+ Let PMS decide the path for the logfile: either the current directory
+ or (when that is read only) the system temp directory.
+ -->
<define name="debugLogPath" class="net.pms.logging.DebugLogPathDefiner" />
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <!-- only show event WARN and higher on the console. -->
+ <!-- Appender for the console -->
+ <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+ <!-- Only log INFO and higher -->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>WARN</level>
+ <level>INFO</level>
</filter>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
- <!-- This pattern mimics the original PMS debug.log format -->
<pattern>%-5level %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %msg%n</pattern>
</encoder>
</appender>
+ <!--
+ Appender for the debug.log that will keep the file growing in size
+ until PMS is restarted.
+ -->
<appender name="debug.log" class="ch.qos.logback.core.FileAppender">
- <!-- only log event DEBUG and higher to the debug.log. -->
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>DEBUG</level>
- </filter>
+ <!-- No threshold filtering, log everything the root logger allows -->
<file>${debugLogPath}${file.separator}debug.log</file>
<append>false</append> <!-- Start new debug.log on each application start -->
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
- <!-- This pattern mimics the original PMS debug.log format -->
<pattern>%-5level %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %msg%n</pattern>
</encoder>
</appender>
- <!-- If unlimited growth of debug.log is not desired use the "debug.log.10MB" -->
- <!-- appender instead of the "debug.log" appender. This appender will -->
- <!-- roll the debug.log file after 10 MBytes and will keep a maximum -->
- <!-- of 5 old and compressed logs. -->
+ <!--
+ Appender for the debug.log that will roll the debug.log file after 10 MBytes
+ and will keep a maximum of 5 old and compressed logs.
+ -->
<appender name="debug.log.10MB" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <!-- only log event DEBUG and higher to the rolling debug.log. -->
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>DEBUG</level>
- </filter>
+ <!-- No threshold filtering, log everything the root logger allows -->
<file>${debugLogPath}${file.separator}debug.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${debugLogPath}debug.log.%i.zip</fileNamePattern>
@@ -52,8 +55,23 @@
</encoder>
</appender>
- <root level="ALL">
- <appender-ref ref="STDOUT" />
+ <!--
+ For debugging purposes it can be handy to define custom levels for
+ specific classes or packages. For example:
+
+ <logger name="net.pms.dlna.DLNAResource" level="ALL" />
+ <logger name="net.pms.network.RequestHandlerV2" level="ALL" />
+ <logger name="net.pms.util" level="ALL" />
+ -->
+
+ <!-- Root logger defines the minimum log level for all loggers -->
+ <root level="DEBUG">
+ <appender-ref ref="console" />
+
+ <!--
+ If unlimited growth of debug.log is not desired use the
+ appender-ref "debug.log.10MB" instead of "debug.log".
+ -->
<appender-ref ref="debug.log" />
<!-- <appender-ref ref="debug.log.10MB" /> -->
</root>
View
2 src/main/external-resources/logback.xml
@@ -76,7 +76,7 @@
<logger name="net.pms.util" level="ALL" />
-->
- <!-- Root logger defines the maximum log level for all loggers -->
+ <!-- Root logger defines the minimum log level for all loggers -->
<root level="DEBUG">
<appender-ref ref="traces" />
<appender-ref ref="console" />

0 comments on commit aed9e6f

Please sign in to comment.