diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2017-02-20 10:33:44 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2017-02-20 10:33:44 +0100 |
commit | 25bf80f2c6c3c6784f78d9d41b5e38a5273a00fe (patch) | |
tree | e0125ce43205e48c0b14faacca248e58037e6479 /java/project/src/resources/logback-test.xml | |
parent | 348663665082107181968a76fd14c2491b4f51e2 (diff) | |
download | share-25bf80f2c6c3c6784f78d9d41b5e38a5273a00fe.zip share-25bf80f2c6c3c6784f78d9d41b5e38a5273a00fe.tar.gz |
java : add project (ant,ivy,junit,logback)
Diffstat (limited to 'java/project/src/resources/logback-test.xml')
-rw-r--r-- | java/project/src/resources/logback-test.xml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/java/project/src/resources/logback-test.xml b/java/project/src/resources/logback-test.xml new file mode 100644 index 0000000..7f49e52 --- /dev/null +++ b/java/project/src/resources/logback-test.xml @@ -0,0 +1,34 @@ +<configuration debug="true"> + + <contextName>MyApp</contextName> + <property resource="Application.properties" /> + <property name="LOG_LEVEL" value="INFO" /> + <property name="LOG_REF" value="FILE" /> + <property name="LOG_FILE" value="${app.logfile}" /> + <property name="LOG_PATTERN" value="%contextName %date{ISO8601} [%-5level %thread] [%file:%line] - %msg%n" /> + + <if condition='property("app.env").contains("DEV")'> + <then> + <property name="LOG_LEVEL" value="DEBUG" /> + <property name="LOG_REF" value="STDOUT" /> + </then> + </if> + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>${LOG_PATTERN}</pattern> + </encoder> + </appender> + + <appender name="FILE" class="ch.qos.logback.core.FileAppender"> + <file>${LOG_FILE}</file> + <encoder> + <pattern>${LOG_PATTERN}</pattern> + </encoder> + </appender> + + <root level="${LOG_LEVEL}"> + <appender-ref ref="${LOG_REF}" /> + </root> + +</configuration> |