You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2015/08/18 17:44:52 UTC
[1/2] logging-log4j2 git commit: avoid unnecessary work (compacter
and presumably slightly better performance)
Repository: logging-log4j2
Updated Branches:
refs/heads/master 4060d7963 -> 36556a0a3
avoid unnecessary work (compacter and presumably slightly better
performance)
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/bb8b302d
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/bb8b302d
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/bb8b302d
Branch: refs/heads/master
Commit: bb8b302d815d244bafd494ef88776e7f70744902
Parents: 7915890
Author: rpopma <rp...@apache.org>
Authored: Wed Aug 19 00:44:08 2015 +0900
Committer: rpopma <rp...@apache.org>
Committed: Wed Aug 19 00:44:08 2015 +0900
----------------------------------------------------------------------
.../org/apache/logging/log4j/core/impl/Log4jLogEvent.java | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bb8b302d/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java
index c5dd320..3305bf8 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java
@@ -270,8 +270,9 @@ public class Log4jLogEvent implements LogEvent {
final Message message, final List<Property> properties, final Throwable t) {
this(loggerName, marker, loggerFQCN, level, message, t, null,
createMap(properties),
- ThreadContext.getDepth() == 0 ? null : ThreadContext.cloneStack(), null,
- null,
+ ThreadContext.getImmutableStack(), // may be ThreadContext.EMPTY_STACK but not null
+ null, // thread name
+ null, // stack trace element
// LOG4J2-628 use log4j.Clock for timestamps
// LOG4J2-744 unless TimestampMessage already has one
message instanceof TimestampMessage ? ((TimestampMessage) message).getTimestamp() :
@@ -372,11 +373,8 @@ public class Log4jLogEvent implements LogEvent {
private static Map<String, String> createMap(final List<Property> properties) {
final Map<String, String> contextMap = ThreadContext.getImmutableContext();
- if (contextMap == null && (properties == null || properties.isEmpty())) {
- return null;
- }
if (properties == null || properties.isEmpty()) {
- return contextMap; // contextMap is not null
+ return contextMap; // may be ThreadContext.EMPTY_MAP but not null
}
final Map<String, String> map = new HashMap<>(contextMap);
[2/2] logging-log4j2 git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/logging-log4j2.git
Posted by rp...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/logging-log4j2.git
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/36556a0a
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/36556a0a
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/36556a0a
Branch: refs/heads/master
Commit: 36556a0a3272101366834f984640885554d12b97
Parents: bb8b302 4060d79
Author: rpopma <rp...@apache.org>
Authored: Wed Aug 19 00:44:36 2015 +0900
Committer: rpopma <rp...@apache.org>
Committed: Wed Aug 19 00:44:36 2015 +0900
----------------------------------------------------------------------
.../src/main/java/org/apache/log4j/Category.java | 5 +++--
.../src/main/java/org/apache/logging/log4j/Level.java | 5 +++--
.../logging/log4j/simple/SimpleLoggerContext.java | 9 ++++-----
.../logging/log4j/spi/AbstractLoggerAdapter.java | 5 +++--
.../org/apache/logging/log4j/TestLoggerContext.java | 5 +++--
.../logging/log4j/core/appender/AsyncAppender.java | 11 ++++++-----
.../logging/log4j/core/appender/FailoverAppender.java | 10 ++++++----
.../log4j/core/config/AbstractConfiguration.java | 10 ++++++----
.../apache/logging/log4j/core/config/Configurator.java | 13 +++++++------
.../apache/logging/log4j/core/impl/ThrowableProxy.java | 5 +++--
.../logging/log4j/core/layout/Rfc5424Layout.java | 9 +++++----
.../apache/logging/log4j/core/lookup/MapLookup.java | 5 +++--
.../org/apache/logging/log4j/core/util/NameUtil.java | 2 +-
.../logging/log4j/core/config/ConfigurationTest.java | 12 ++++++++++++
14 files changed, 65 insertions(+), 41 deletions(-)
----------------------------------------------------------------------