Skip to content

Commit 596889e

Browse files
committed
Add more configuration properties
1 parent d97bf0f commit 596889e

File tree

7 files changed

+36
-5
lines changed

7 files changed

+36
-5
lines changed

azure/spring-boot-autoconfigure-azure-test/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ dependencies {
1818
api ("org.entur.jackson:jackson-syntax-highlight:${jacksonSyntaxHighlightVersion}")
1919
api ("org.entur.logback-logstash-syntax-highlighting-decorators:logback-logstash-syntax-highlighting-decorators:${logbackLogstashSyntaxHighlightingDecoratorsVersion}")
2020

21+
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}"
22+
2123
testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}")
2224
}
2325

azure/spring-boot-autoconfigure-azure-test/src/main/java/no/entur/logging/cloud/azure/spring/test/LoggingStyleAutoConfiguration.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@
1313
@ConditionalOnProperty(name = {"entur.logging.style"})
1414
public class LoggingStyleAutoConfiguration {
1515

16-
@Value("${entur.logging.style}") CompositeConsoleOutputType style;
16+
@Value("${entur.logging.style}")
17+
private CompositeConsoleOutputType style;
1718

1819
@PostConstruct
1920
public void enforceStyle() {
20-
CompositeConsoleOutputControl.setOutput(style);
21+
if(style != null) {
22+
CompositeConsoleOutputControl.setOutput(style);
23+
}
2124
}
2225

2326
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"properties": [
3+
{
4+
"name": "entur.logging.style",
5+
"type": "no.entur.logging.cloud.logback.logstash.test.CompositeConsoleOutputType"
6+
}
7+
]
8+
}

gcp/spring-boot-autoconfigure-gcp-test/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,16 @@ dependencies {
1818
api ("org.entur.jackson:jackson-syntax-highlight:${jacksonSyntaxHighlightVersion}")
1919
api ("org.entur.logback-logstash-syntax-highlighting-decorators:logback-logstash-syntax-highlighting-decorators:${logbackLogstashSyntaxHighlightingDecoratorsVersion}")
2020

21+
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}"
22+
2123
testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}")
2224
}
2325

26+
tasks.named('compileJava') {
27+
inputs.files(tasks.named('processResources'))
28+
}
29+
30+
2431

2532

2633

gcp/spring-boot-autoconfigure-gcp-test/src/main/java/no/entur/logging/cloud/gcp/spring/test/LoggingStyleAutoConfiguration.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@
1313
@ConditionalOnProperty(name = {"entur.logging.style"})
1414
public class LoggingStyleAutoConfiguration {
1515

16-
@Value("${entur.logging.style}") CompositeConsoleOutputType style;
16+
@Value("${entur.logging.style}")
17+
private CompositeConsoleOutputType style;
1718

1819
@PostConstruct
1920
public void enforceStyle() {
20-
CompositeConsoleOutputControl.setOutput(style);
21+
if(style != null) {
22+
CompositeConsoleOutputControl.setOutput(style);
23+
}
2124
}
2225

2326
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"properties": [
3+
{
4+
"name": "entur.logging.style",
5+
"type": "no.entur.logging.cloud.logback.logstash.test.CompositeConsoleOutputType"
6+
}
7+
]
8+
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#Fri Jan 31 09:40:22 UTC 2025
22
org.gradle.jvmargs=-XX\:MaxMetaspaceSize\=512m -Xmx4g
3-
version=4.0.4-SNAPSHOT
3+
version=4.1.0-SNAPSHOT
44
group=no.entur.logging.cloud

0 commit comments

Comments
 (0)