-
Notifications
You must be signed in to change notification settings - Fork 1
/
logback-docker.xml
27 lines (24 loc) · 1.21 KB
/
logback-docker.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- <variable scope="context" name="appName" value="${APP_NAME}" />-->
<springProperty scope="context" name="appName" source="appName"/>
<appender name="TEXT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${appName} | [%date] %highlight([%level]) %cyan([%logger{10} %file:%line]) %msg%n</pattern>
</encoder>
</appender>
<appender name="JSON" class="ch.qos.logback.core.ConsoleAppender">
<!-- JSON Encoder is missing from the classpath :( -->
<!-- <encoder class="ch.qos.logback.classic.encoder.JsonEncoder"/>-->
<encoder>
<pattern>
{"timestamp":"%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}","level":"%level","logger":"%logger","location":"%file:%line","message":"%replace(%replace(%msg){'\n','\\n'}){'"','\"'}","ex":"%replace(%replace(%ex{full}){'\n','\\n'}){'"','\"'}"}%n
</pattern>
</encoder>
</appender>
<!-- Disable flood of hibernate deprecation warnings-->
<logger name="org.hibernate.orm.deprecation" level="OFF"/>
<root level="${LOG_LEVEL:-INFO}">
<appender-ref ref="${LOG_FORMAT:-TEXT}"/>
</root>
</configuration>