glowroot-central.0.14.0-beta.2.source-code.logback.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration> <configuration> <!-- to edit this file, copy it to the glowroot-central folder (where glowroot-central.jar resides), keeping the same file name (logback.xml), and glowroot-central will find it and use it instead of the logback.xml configuration file that is inside glowroot-central.jar --> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</pattern> </encoder> </appender> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${glowroot.log.dir}/glowroot-central.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> <fileNamePattern>${glowroot.log.dir}/glowroot-central.%i.log</fileNamePattern> <minIndex>1</minIndex> <maxIndex>10</maxIndex> </rollingPolicy> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <maxFileSize>10MB</maxFileSize> </triggeringPolicy> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</pattern> </encoder> </appender> <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator" /> <!-- AggregateFuture is used by Futures.allAsList() and it logs all the failures after the first failure (the first failure is reported via the resulting Future.get()), which typically results in lots of spamming of similar errors (e.g. Cassandra timeouts) --> <logger name="com.google.common.util.concurrent.AggregateFuture" level="off" /> <root level="info"> <!-- use -Dglowroot.log.consoleOff=true to turn off console logging --> <if condition="p("glowroot.log.consoleOff").equalsIgnoreCase("true")"> <else> <appender-ref ref="CONSOLE" /> </else> </if> <appender-ref ref="FILE" /> </root> <!-- use -Dglowroot.log.auditOn=true to turn on audit logging --> <if condition="p("glowroot.log.auditOn").equalsIgnoreCase("true")"> <then> <appender name="AUDIT" class="ch.qos.logback.core.rolling.RollingFileAppender"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern> ${glowroot.log.dir}/glowroot-central-audit.%d{yyyy-MM-dd}.log </fileNamePattern> <maxHistory>30</maxHistory> </rollingPolicy> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} - %msg%n</pattern> </encoder> </appender> <logger name="audit" level="info" additivity="false"> <appender-ref ref="AUDIT" /> </logger> </then> <else> <logger name="audit" level="off" /> </else> </if> </configuration>