diff options
Diffstat (limited to 'examples')
5 files changed, 28 insertions, 4 deletions
diff --git a/examples/spring-boot/pom.xml b/examples/spring-boot/pom.xml index 2940c66..8cb994a 100644 --- a/examples/spring-boot/pom.xml +++ b/examples/spring-boot/pom.xml @@ -42,7 +42,7 @@ SPDX-License-Identifier: GPL-3.0-or-later <dependency> <groupId>org.jboss.slf4j</groupId> <artifactId>slf4j-jboss-logmanager</artifactId> - <version>1.1.0.Final</version> + <version>2.0.1.Final</version> </dependency> <!-- *** optional *** <dependency> @@ -97,6 +97,11 @@ SPDX-License-Identifier: GPL-3.0-or-later <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>${spring-boot.version}</version> + <configuration> + <systemPropertyVariables> + <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> + </systemPropertyVariables> + </configuration> </plugin> </plugins> </build> diff --git a/examples/spring-boot/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RootResource.java b/examples/spring-boot/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RootResource.java index a2b824a..77c1f84 100644 --- a/examples/spring-boot/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RootResource.java +++ b/examples/spring-boot/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RootResource.java @@ -10,9 +10,11 @@ import jakarta.annotation.PostConstruct; import org.jboss.logging.Logger; import org.jboss.logging.MDC; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -@RestController("/") +@RestController +@RequestMapping("/") public class RootResource { static final Logger log = Logger.getLogger(RootResource.class); diff --git a/examples/spring-boot/src/main/resources/META-INF/services/org.jboss.logmanager.ConfiguratorFactory b/examples/spring-boot/src/main/resources/META-INF/services/org.jboss.logmanager.ConfiguratorFactory new file mode 100644 index 0000000..c4b4beb --- /dev/null +++ b/examples/spring-boot/src/main/resources/META-INF/services/org.jboss.logmanager.ConfiguratorFactory @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: © 2023 Matthias Andreas Benkard <code@mail.matthias.benkard.de> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +# For JBoss Log Manager 3.x (or JBoss Log Manager Embedded 1.2 or later) +eu.mulk.quarkus.googlecloud.jsonlogging.logmanager.DefaultConfiguratorFactory diff --git a/examples/spring-boot/src/main/resources/META-INF/services/org.jboss.logmanager.EmbeddedConfigurator b/examples/spring-boot/src/main/resources/META-INF/services/org.jboss.logmanager.EmbeddedConfigurator index 6d937e5..b9ffbe2 100644 --- a/examples/spring-boot/src/main/resources/META-INF/services/org.jboss.logmanager.EmbeddedConfigurator +++ b/examples/spring-boot/src/main/resources/META-INF/services/org.jboss.logmanager.EmbeddedConfigurator @@ -1 +1,6 @@ +# SPDX-FileCopyrightText: © 2023 Matthias Andreas Benkard <code@mail.matthias.benkard.de> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +# For JBoss Log Manager Embedded 1.1.x and earlier. eu.mulk.quarkus.googlecloud.jsonlogging.logmanager.DefaultEmbeddedConfigurator diff --git a/examples/spring-boot/src/main/resources/logging.properties b/examples/spring-boot/src/main/resources/logging.properties index 31aebd7..8bc0033 100644 --- a/examples/spring-boot/src/main/resources/logging.properties +++ b/examples/spring-boot/src/main/resources/logging.properties @@ -2,5 +2,11 @@ # # SPDX-License-Identifier: GPL-3.0-or-later -handlers = eu.mulk.quarkus.googlecloud.jsonlogging.logmanager.DefaultConsoleHandler -.level = INFO +# java.util.logging properties +#handlers = eu.mulk.quarkus.googlecloud.jsonlogging.logmanager.DefaultConsoleHandler +#.level = INFO + +# JBoss Log Manager properties +logger.level = INFO +logger.handlers = GOOGLEJSON +handler.GOOGLEJSON = eu.mulk.quarkus.googlecloud.jsonlogging.logmanager.DefaultConsoleHandler |