Skip to content

Commit 61c67d4

Browse files
committed
Merge branch 'main' into dependabot-staging-main
2 parents f328f9c + f06406e commit 61c67d4

File tree

8 files changed

+4
-99
lines changed

8 files changed

+4
-99
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,7 @@ also protected, so an application is free to extend it to modify the existing be
177177
### Logging Auto Configuration
178178

179179
This autoconfiguration is enabled by default if the `pcalouche-spring-boot-starter-app` is on the classpath. The
180-
`pcalouche-spring-boot-starter-app` includes `pcalouche-spring-boot-starter-logging` which bundles . It's only
181-
configurable behavior is setting `springforge.logging.json-format=true` to enable logging in JSON format. This is useful
182-
for consumption by various monitoring tools.
180+
`pcalouche-spring-boot-starter-app` includes `pcalouche-spring-boot-starter-logging` which bundles [Logstash](https://github.com/logfellow/logstash-logback-encoder/blob/main/pom.xml) to make advanced logging features available in applications.
183181

184182
## The Spring Forge Libraries
185183

autoconfigure/src/main/java/dev/pcalouche/springforge/autoconfigure/logging/LoggingAutoConfiguration.java

Lines changed: 0 additions & 16 deletions
This file was deleted.

autoconfigure/src/main/java/dev/pcalouche/springforge/autoconfigure/logging/LoggingProperties.java

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
dev.pcalouche.springforge.autoconfigure.controlleradvice.CommonControllerAdviceAutoConfiguration
2-
dev.pcalouche.springforge.autoconfigure.logging.LoggingAutoConfiguration
1+
dev.pcalouche.springforge.autoconfigure.controlleradvice.CommonControllerAdviceAutoConfiguration

autoconfigure/src/test/java/dev/pcalouche/springforge/autoconfigure/logging/LoggingAutoConfigurationTest.java

Lines changed: 0 additions & 22 deletions
This file was deleted.

libs/logging-test/src/main/resources/logback-test.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,5 @@
2424
<logger name="com.github.dockerjava" level="WARN"/>
2525
<logger name="com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire" level="OFF"/>
2626
<!-- End recommended test logging for test containers -->
27-
<!-- This one is noisy in tests too. -->
28-
<logger name="de.flapdoodle.embed.mongo" level="WARN"/>
2927

3028
</configuration>

libs/logging/src/main/resources/logback-spring.xml

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<configuration>
3-
4-
<!-- sets some suggested spring boot defaults -->
3+
<!-- Sets some suggested Spring Boot defaults -->
54
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
6-
<springProperty name="app_name" source="spring.application.name"/>
7-
8-
<!--
9-
When springforge.logging.json-format in the Spring properties is set to true, the logs will be
10-
in Logstash JSON format. Otherwise, the logs will be standard colorized Spring Boot logging.
11-
The springProperty attribute makes the eh.logging.json-format spring property accessible here.
12-
-->
13-
<springProperty name="springforge_logging_json_format" source="springforge.logging.json-format"/>
14-
<if condition='p("springforge_logging_json_format").equals("true")'>
15-
<then>
16-
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
17-
<encoder class="net.logstash.logback.encoder.LogstashEncoder">
18-
<fieldNames>
19-
<timestamp>ts</timestamp>
20-
</fieldNames>
21-
<timeZone>UTC</timeZone>
22-
<customFields>{"app_name":"${app_name}"}</customFields>
23-
</encoder>
24-
</appender>
25-
</then>
26-
<else>
27-
<!-- includes an appender named CONSOLE -->
28-
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
29-
</else>
30-
</if>
5+
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
316

327
<!-- register all appenders -->
338
<root level="INFO">

spring-boot-starters/pcalouche-spring-boot-starter-logging/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@
2626
<groupId>net.logstash.logback</groupId>
2727
<artifactId>logstash-logback-encoder</artifactId>
2828
</dependency>
29-
<!-- This is needed for logback "Conditional Processing". See https://logback.qos.ch/manual/configuration.html#conditional -->
30-
<dependency>
31-
<groupId>org.codehaus.janino</groupId>
32-
<artifactId>janino</artifactId>
33-
</dependency>
3429
</dependencies>
3530

3631
</project>

0 commit comments

Comments
 (0)