-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathlogback.xml
More file actions
31 lines (30 loc) · 1.33 KB
/
logback.xml
File metadata and controls
31 lines (30 loc) · 1.33 KB
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
28
29
30
31
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<configuration debug="false" scan="false">
<turboFilter
class="com.sap.hcp.cf.logback.filter.DynamicLevelPrefixLoggerTurboFilter"/>
<!-- write logs to console -->
<appender name="STDOUT-JSON"
class="ch.qos.logback.core.ConsoleAppender">
<!-- encode and enrich full message with the required fields/tags -->
<encoder class="com.sap.hcp.cf.logback.encoder.JsonEncoder">
<contextFieldSupplier>com.sap.hcp.cf.logging.sample.springboot.statistics.StatisticsContextFieldSupplier
</contextFieldSupplier>
<!-- Uncomment to send message count as nested custom field: -->
<!-- <customFieldMdcKeyName>message_count</customFieldMdcKeyName> -->
</encoder>
</appender>
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d %-5level [%thread] %logger{0} [%mdc]>: %msg
%replace(%xEx){'\n', ' | '}%nopex%n
</pattern>
</encoder>
</appender>
<!-- default log level for all loggers is INFO by default -->
<root level="${LOG_ROOT_LEVEL:-INFO}">
<appender-ref ref="STDOUT-JSON"/>
</root>
<logger name="com.sap.hcp.cf" level="${LOG_HCP_CF_LEVEL:-INFO}"/>
</configuration>