Skip to content

Commit

Permalink
Fix LoggingSystemFactory loading priority
Browse files Browse the repository at this point in the history
  • Loading branch information
agentgt committed Aug 23, 2024
1 parent cad9963 commit 48490d5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
name: test-results
path: '**/target/surefire-reports/TEST-*.xml'
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: jstachio/rainbowgum
Expand Down
1 change: 1 addition & 0 deletions spring/rainbowgum-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rainbowgum</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@
*/
module io.jstach.rainbowgum.spring.boot.starter {
requires static org.eclipse.jdt.annotation;
/*
* TODO For some reason Maven javadoc plugin thinks
* this is needed.
*/
requires io.jstach.rainbowgum.spring.boot;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import org.springframework.boot.logging.LoggingInitializationContext;
import org.springframework.boot.logging.LoggingSystem;
import org.springframework.boot.logging.LoggingSystemFactory;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.core.env.Environment;

import io.jstach.rainbowgum.LogConfig;
Expand All @@ -28,6 +30,7 @@
* Creates the RainbowGum LoggingSystem that gets called by Spring Boot initializing its
* logging.
*/
@Order(value = Ordered.HIGHEST_PRECEDENCE)
public class RainbowGumLoggingSystemFactory implements LoggingSystemFactory {

/**
Expand Down
14 changes: 5 additions & 9 deletions test/rainbowgum-test-spring-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@
</property>
</activation>
<dependencies>
<dependency>
<groupId>io.jstach.rainbowgum</groupId>
<artifactId>rainbowgum-spring-boot-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
Expand All @@ -64,15 +69,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.jstach.rainbowgum</groupId>
<artifactId>rainbowgum</artifactId>
</dependency>
<dependency>
<groupId>io.jstach.rainbowgum</groupId>
<artifactId>rainbowgum-spring-boot-starter</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>
</profiles>
Expand Down

0 comments on commit 48490d5

Please sign in to comment.