From 7f8d791943b1b9812dcf78cb8d5cc8842ff59e7d Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Thu, 16 Jan 2014 11:37:20 -0600 Subject: [PATCH] HHH-8865 - Create topical guide for logging (cherry picked from commit fa4f0850c37d043e092c62f15503e6d8939c0428) --- .../asciidoc/topical/logging/Logging.adoc | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/documentation/src/main/asciidoc/topical/logging/Logging.adoc b/documentation/src/main/asciidoc/topical/logging/Logging.adoc index 201d528641..6600097271 100644 --- a/documentation/src/main/asciidoc/topical/logging/Logging.adoc +++ b/documentation/src/main/asciidoc/topical/logging/Logging.adoc @@ -23,24 +23,19 @@ for example, if you have both JBoss LogManager and Slf4j available your classpa as it has the "higher precedence". This can sometimes lead to an unwanted logging set up to be used. In such cases, JBoss Logging provides for you to -tell it specifically which provider to use. +tell it specifically which provider to use and circumvent the discovery process just described. It allows 2 different +mechanisms for this: +. First, JBoss Logging will look for a *System* setting with the key `org.jboss.logging.provider`, which can be set to +one of the following values: -=== Provider setting + * jboss + * jdk + * log4j2 + * log4j + * slf4j -JBoss Logging will first look for a setting with the key `org.jboss.logging.provider`, which can be set to one of the -following values: - -. jboss -. jdk -. log4j2 -. log4j -. slf4j - - -=== JDK Service - -Next, JBoss Logging will look for a JDK service (see javadocs for +java.util.ServiceLoader+ for details) for its +. Next, JBoss Logging will look for a JDK service (see javadocs for +java.util.ServiceLoader+ for details) for its "provider" contract (+org.jboss.logging.Provider+). If multiple are available, it will use the first one returned by the ClassLoader.