summaryrefslogtreecommitdiff
path: root/examples/spring-boot/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'examples/spring-boot/src/main')
-rw-r--r--examples/spring-boot/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RootResource.java4
-rw-r--r--examples/spring-boot/src/main/resources/META-INF/services/org.jboss.logmanager.ConfiguratorFactory6
-rw-r--r--examples/spring-boot/src/main/resources/META-INF/services/org.jboss.logmanager.EmbeddedConfigurator5
-rw-r--r--examples/spring-boot/src/main/resources/logging.properties10
4 files changed, 22 insertions, 3 deletions
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