Skip to content

Instantly share code, notes, and snippets.

@yamanyar
Created April 7, 2012 05:10
Show Gist options
  • Save yamanyar/2325457 to your computer and use it in GitHub Desktop.
Save yamanyar/2325457 to your computer and use it in GitHub Desktop.
environment specific log back config
<configuration>
<if condition='"prd".equals(property("environment"))
|| "stg".equals(property("environment"))'>
<then>
<property name="APPLINK_LOG_LEVEL" value="warn"/>
</then>
<else>
<property name="APPLINK_LOG_LEVEL" value="debug"/>
</else>
</if>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="${APPLINK_LOG_LEVEL}">
<appender-ref ref="STDOUT"/>
</root>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment