Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
68 lines (51 sloc) 2.39 KB
<!--
SPDX-License-Identifier: CC0-1.0
Copyright 2018-2019 Will Sargent.
Licensed under the CC0 Public Domain Dedication;
You may obtain a copy of the License at
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!--
This is an example configuration of Logback using async appenders from logstash-logback-encoder and with
some custom configuration using Typesafe Config, so you only have to touch logback.conf in your project
and have sensible structured logging defaults.
THIS IS NOT INTENDED TO BE A DROP IN REPLACEMENT. Please see the documentation at
https://github.com/tersesystems/terse-logback/
and the links in the comments.
-->
<included>
<include resource="terse-logback/initial.xml"/>
<include resource="terse-logback/censor.xml"/>
<include resource="terse-logback/exceptions.xml"/>
<include resource="terse-logback/appenders/audio-appenders.xml"/>
<include resource="terse-logback/appenders/console-appenders.xml"/>
<include resource="terse-logback/appenders/jsonfile-appenders.xml"/>
<include resource="terse-logback/appenders/textfile-appenders.xml"/>
<appender name="development" class="com.tersesystems.logback.core.CompositeAppender">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="AUDIO"/>
<appender-ref ref="ASYNC_TEXTFILE"/>
<appender-ref ref="ASYNC_JSONFILE"/>
</appender>
<appender name="test" class="com.tersesystems.logback.core.CompositeAppender">
<appender-ref ref="ASYNC_TEXTFILE"/>
</appender>
<appender name="production" class="com.tersesystems.logback.core.CompositeAppender">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="ASYNC_JSONFILE"/>
</appender>
<appender name="selector" class="com.tersesystems.logback.core.SelectAppender">
<!-- Set logback.conf or logback-test.conf with "local.logback.environment=development" -->
<appenderKey>${logback.environment:-development}</appenderKey>
<appender-ref ref="development"/>
<appender-ref ref="production"/>
<appender-ref ref="test"/>
</appender>
<appender name="selector-with-unique-id" class="com.tersesystems.logback.uniqueid.UniqueIdEventAppender">
<appender-ref ref="selector"/>
</appender>
<root>
<appender-ref ref="selector-with-unique-id"/>
</root>
<include resource="terse-logback/ending.xml" />
</included>
You can’t perform that action at this time.