summaryrefslogtreecommitdiff
path: root/examples/spring-boot/src/main
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2023-09-24 12:57:37 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2023-09-24 13:48:17 +0200
commitddcce2e8bc1c43e73a4033b4d76b5e06a4a3ad89 (patch)
treec2f8f53ec1dc0480c8dcc895605f5e961989d626 /examples/spring-boot/src/main
parent95c2a90fb4d0a8c69af70f12dd12cdb168116cb4 (diff)
feat(core): Add DefaultConfiguratorFactory for JBoss Log Manager 3.x.
Change-Id: I6bf88c9e6c8c4aba303cc1d18e8f18c917dd6b88
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