This is an automated email from the ASF dual-hosted git repository.
rmannibucau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git
The following commit(s) were added to refs/heads/master by this push:
new 560b830 enable to change the FQN used in slf4j integration since
log4j2 currently uses StackWalker without guards
560b830 is described below
commit 560b83010f77efa12c40410ee9fddaf3bcc5cb12
Author: Romain Manni-Bucau <[email protected]>
AuthorDate: Fri Mar 27 14:59:22 2020 +0100
enable to change the FQN used in slf4j integration since log4j2 currently
uses StackWalker without guards
---
.../org/apache/openwebbeans/slf4j/Slf4jLogger.java | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git
a/webbeans-slf4j/src/main/java/org/apache/openwebbeans/slf4j/Slf4jLogger.java
b/webbeans-slf4j/src/main/java/org/apache/openwebbeans/slf4j/Slf4jLogger.java
index 4636b2e..b9df24f 100644
---
a/webbeans-slf4j/src/main/java/org/apache/openwebbeans/slf4j/Slf4jLogger.java
+++
b/webbeans-slf4j/src/main/java/org/apache/openwebbeans/slf4j/Slf4jLogger.java
@@ -32,6 +32,8 @@ import java.util.logging.Logger;
// mainly from cxf
class Slf4jLogger extends Logger
{
+ private static final String FQN =
System.getProperty("org.apache.openwebbeans.slf4j.fqn", Logger.class.getName());
+
private final org.slf4j.Logger logger;
private final LocationAwareLogger locationAwareLogger;
@@ -521,7 +523,7 @@ class Slf4jLogger extends Logger
}
else
{
- locationAwareLogger.log(null, Logger.class.getName(),
LocationAwareLogger.DEBUG_INT, msg, null, t);
+ locationAwareLogger.log(null, FQN,
LocationAwareLogger.DEBUG_INT, msg, null, t);
}
}
else if (Level.INFO.equals(level))
@@ -532,7 +534,7 @@ class Slf4jLogger extends Logger
}
else
{
- locationAwareLogger.log(null, Logger.class.getName(),
LocationAwareLogger.INFO_INT, msg, null, t);
+ locationAwareLogger.log(null, FQN,
LocationAwareLogger.INFO_INT, msg, null, t);
}
}
else if (Level.WARNING.equals(level))
@@ -543,7 +545,7 @@ class Slf4jLogger extends Logger
}
else
{
- locationAwareLogger.log(null, Logger.class.getName(),
LocationAwareLogger.WARN_INT, msg, null, t);
+ locationAwareLogger.log(null, FQN,
LocationAwareLogger.WARN_INT, msg, null, t);
}
}
else if (Level.FINER.equals(level))
@@ -554,7 +556,7 @@ class Slf4jLogger extends Logger
}
else
{
- locationAwareLogger.log(null, Logger.class.getName(),
LocationAwareLogger.DEBUG_INT, msg, null, t);
+ locationAwareLogger.log(null, FQN,
LocationAwareLogger.DEBUG_INT, msg, null, t);
}
}
else if (Level.FINEST.equals(level))
@@ -565,7 +567,7 @@ class Slf4jLogger extends Logger
}
else
{
- locationAwareLogger.log(null, Logger.class.getName(),
LocationAwareLogger.TRACE_INT, msg, null, t);
+ locationAwareLogger.log(null, FQN,
LocationAwareLogger.TRACE_INT, msg, null, t);
}
}
else if (Level.ALL.equals(level))
@@ -576,7 +578,7 @@ class Slf4jLogger extends Logger
}
else
{
- locationAwareLogger.log(null, Logger.class.getName(),
LocationAwareLogger.ERROR_INT, msg, null, t);
+ locationAwareLogger.log(null, FQN,
LocationAwareLogger.ERROR_INT, msg, null, t);
}
}
else if (Level.SEVERE.equals(level))
@@ -587,7 +589,7 @@ class Slf4jLogger extends Logger
}
else
{
- locationAwareLogger.log(null, Logger.class.getName(),
LocationAwareLogger.ERROR_INT, msg, null, t);
+ locationAwareLogger.log(null, FQN,
LocationAwareLogger.ERROR_INT, msg, null, t);
}
}
else if (Level.CONFIG.equals(level))
@@ -598,7 +600,7 @@ class Slf4jLogger extends Logger
}
else
{
- locationAwareLogger.log(null, Logger.class.getName(),
LocationAwareLogger.DEBUG_INT, msg, null, t);
+ locationAwareLogger.log(null, FQN,
LocationAwareLogger.DEBUG_INT, msg, null, t);
}
}
}