Skip to content

Commit af55522

Browse files
committed
Add ECS console appender for spring boot
1 parent ba0a724 commit af55522

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
ECS JSON console appender logback configuration provided for import, similar to the console-appender.xml included in Spring Boot
5+
<include resource="co/elastic/logging/logback/boot/ecs-console-appender.xml" />
6+
-->
7+
8+
<included>
9+
<springProperty name="SERVICE_NAME" source="spring.application.name"/>
10+
<appender name="ECS_JSON_CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
11+
<encoder class="co.elastic.logging.logback.EcsEncoder">
12+
<serviceName>${SERVICE_NAME:-spring-boot-application}</serviceName>
13+
</encoder>
14+
</appender>
15+
</included>

0 commit comments

Comments
 (0)