You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2019/08/05 14:45:45 UTC
[logging-log4j2] branch master updated: LOG4J2-2644 - Cache
requiresLocation boolean
This is an automated email from the ASF dual-hosted git repository.
rgoers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/master by this push:
new a82a855 LOG4J2-2644 - Cache requiresLocation boolean
a82a855 is described below
commit a82a8556ad4fc28a97ab8dc1568de7dc7829c26f
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Mon Aug 5 07:45:33 2019 -0700
LOG4J2-2644 - Cache requiresLocation boolean
---
log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java
index b7e6db9..806f4a7 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java
@@ -140,7 +140,7 @@ public class Logger extends AbstractLogger implements Supplier<LoggerConfig> {
@Override
protected boolean requiresLocation() {
- return privateConfig.loggerConfig.requiresLocation();
+ return privateConfig.requiresLocation;
}
@Override
@@ -389,6 +389,7 @@ public class Logger extends AbstractLogger implements Supplier<LoggerConfig> {
private final Level loggerConfigLevel;
private final int intLevel;
private final Logger logger;
+ private final boolean requiresLocation;
public PrivateConfig(final Configuration config, final Logger logger) {
this.config = config;
@@ -396,6 +397,7 @@ public class Logger extends AbstractLogger implements Supplier<LoggerConfig> {
this.loggerConfigLevel = this.loggerConfig.getLevel();
this.intLevel = this.loggerConfigLevel.intLevel();
this.logger = logger;
+ this.requiresLocation = this.loggerConfig.requiresLocation();
}
public PrivateConfig(final PrivateConfig pc, final Level level) {
@@ -404,6 +406,7 @@ public class Logger extends AbstractLogger implements Supplier<LoggerConfig> {
this.loggerConfigLevel = level;
this.intLevel = this.loggerConfigLevel.intLevel();
this.logger = pc.logger;
+ this.requiresLocation = this.loggerConfig.requiresLocation();
}
public PrivateConfig(final PrivateConfig pc, final LoggerConfig lc) {
@@ -412,6 +415,7 @@ public class Logger extends AbstractLogger implements Supplier<LoggerConfig> {
this.loggerConfigLevel = lc.getLevel();
this.intLevel = this.loggerConfigLevel.intLevel();
this.logger = pc.logger;
+ this.requiresLocation = this.loggerConfig.requiresLocation();
}
// LOG4J2-151: changed visibility to public