logging-log4j2 git commit: Document how to access snapshot dependencies
Repository: logging-log4j2 Updated Branches: refs/heads/master dd943975b -> 488f28b10 Document how to access snapshot dependencies Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/488f28b1 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/488f28b1 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/488f28b1 Branch: refs/heads/master Commit: 488f28b10e8b1f1f747a803278d7cf16d79b8864 Parents: dd94397 Author: Mikael Ståldal Authored: Fri Sep 16 13:23:53 2016 +0200 Committer: Mikael Ståldal Committed: Fri Sep 16 13:23:53 2016 +0200 -- src/site/xdoc/maven-artifacts.xml.vm | 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/488f28b1/src/site/xdoc/maven-artifacts.xml.vm -- diff --git a/src/site/xdoc/maven-artifacts.xml.vm b/src/site/xdoc/maven-artifacts.xml.vm index 0bf3a7e..8ef4d00 100644 --- a/src/site/xdoc/maven-artifacts.xml.vm +++ b/src/site/xdoc/maven-artifacts.xml.vm @@ -405,5 +405,10 @@ dependencies { ]]> + +You can access the latest development snapshot by using the Maven repository + https://repository.apache.org/content/repositories/snapshots/ and version +2.6.3-SNAPSHOT. +
logging-log4j2 git commit: Document how to access snapshot dependencies better
Repository: logging-log4j2 Updated Branches: refs/heads/master 488f28b10 -> 11e395ab5 Document how to access snapshot dependencies better Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/11e395ab Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/11e395ab Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/11e395ab Branch: refs/heads/master Commit: 11e395ab5e81a2a8e013eef2b7485f6c1460efab Parents: 488f28b Author: Mikael Ståldal Authored: Fri Sep 16 14:38:16 2016 +0200 Committer: Mikael Ståldal Committed: Fri Sep 16 14:38:16 2016 +0200 -- src/site/xdoc/maven-artifacts.xml.vm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/11e395ab/src/site/xdoc/maven-artifacts.xml.vm -- diff --git a/src/site/xdoc/maven-artifacts.xml.vm b/src/site/xdoc/maven-artifacts.xml.vm index 8ef4d00..7c139df 100644 --- a/src/site/xdoc/maven-artifacts.xml.vm +++ b/src/site/xdoc/maven-artifacts.xml.vm @@ -407,8 +407,7 @@ dependencies { You can access the latest development snapshot by using the Maven repository - https://repository.apache.org/content/repositories/snapshots/ and version -2.6.3-SNAPSHOT. + https://repository.apache.org/content/repositories/snapshots/ and the current SNAPSHOT version.
logging-log4j2 git commit: Add missing '@Deprecated' annotations.
Repository: logging-log4j2 Updated Branches: refs/heads/master 11e395ab5 -> debc56407 Add missing '@Deprecated' annotations. Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/debc5640 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/debc5640 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/debc5640 Branch: refs/heads/master Commit: debc56407b187c461bb6000d9b3996aa2be94bfe Parents: 11e395a Author: Gary Gregory Authored: Fri Sep 16 09:53:33 2016 -0700 Committer: Gary Gregory Committed: Fri Sep 16 09:53:33 2016 -0700 -- .../src/main/java/org/apache/logging/log4j/core/LogEvent.java | 1 + .../java/org/apache/logging/log4j/core/config/LoggerConfig.java | 1 + 2 files changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/debc5640/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java -- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java index 872793d..9bdd4bf 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java @@ -54,6 +54,7 @@ public interface LogEvent extends Serializable { * @return The context map, never {@code null}. * @deprecated use {@link #getContextData()} instead */ +@Deprecated Map getContextMap(); /** http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/debc5640/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java -- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java index 0fc7b3f..cc125b5 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java @@ -326,6 +326,7 @@ public class LoggerConfig extends AbstractFilterable { * @deprecated use {@link #getPropertyList()} instead */ // LOG4J2-157 +@Deprecated public Map getProperties() { if (properties == null) { return null;
logging-log4j2 git commit: LOG4J2-1010 moved ContextDataInjector from core.impl to core package
Repository: logging-log4j2 Updated Branches: refs/heads/master debc56407 -> 7007b861c LOG4J2-1010 moved ContextDataInjector from core.impl to core package Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/7007b861 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/7007b861 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/7007b861 Branch: refs/heads/master Commit: 7007b861cc77dac2b693b9b21a699e3b64c2aefd Parents: debc564 Author: rpopma Authored: Sat Sep 17 02:39:03 2016 +0900 Committer: rpopma Committed: Sat Sep 17 02:39:03 2016 +0900 -- .../logging/log4j/core/ContextDataInjector.java | 107 +++ .../org/apache/logging/log4j/core/LogEvent.java | 2 +- .../logging/log4j/core/async/AsyncLogger.java | 2 +- .../async/RingBufferLogEventTranslator.java | 2 +- .../core/filter/DynamicThresholdFilter.java | 3 +- .../core/filter/ThreadContextMapFilter.java | 3 +- .../log4j/core/impl/ContextDataInjector.java| 105 -- .../core/impl/ContextDataInjectorFactory.java | 1 + .../logging/log4j/core/impl/Log4jLogEvent.java | 1 + .../core/impl/ReusableLogEventFactory.java | 1 + .../core/impl/ThreadContextDataInjector.java| 1 + .../log4j/core/lookup/ContextMapLookup.java | 3 +- .../log4j/perf/jmh/ThreadContextBenchmark.java | 2 +- 13 files changed, 118 insertions(+), 115 deletions(-) -- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7007b861/log4j-core/src/main/java/org/apache/logging/log4j/core/ContextDataInjector.java -- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/ContextDataInjector.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/ContextDataInjector.java new file mode 100644 index 000..93f719b --- /dev/null +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/ContextDataInjector.java @@ -0,0 +1,107 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache license, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the license for the specific language governing permissions and + * limitations under the license. + */ +package org.apache.logging.log4j.core; + +import java.util.List; + +import org.apache.logging.log4j.core.config.Property; +import org.apache.logging.log4j.core.impl.ContextDataInjectorFactory; +import org.apache.logging.log4j.core.impl.ThreadContextDataInjector; +import org.apache.logging.log4j.spi.ContextData; +import org.apache.logging.log4j.spi.MutableContextData; + +/** + * Responsible for initializing the ContextData of LogEvents. Context data is data that is set by the application to be + * included in all subsequent log events. + * + * The source of the context data is implementation-specific. The default source for context data is the ThreadContext. + * + * In some asynchronous models, work may be delegated to several threads, while conceptually this work shares the same + * context. In such models, storing context data in {@code ThreadLocal} variables is not convenient or desirable. + * Users can configure the {@code ContextDataInjectorFactory} to provide custom {@code ContextDataInjector} objects, + * in order to initialize log events with context data from any arbitrary context. + * + * When providing a custom {@code ContextDataInjector}, be aware that the {@code ContextDataFactory} may be invoked + * multiple times and the various components in Log4j that need access to context data may each have their own instance + * of {@code ContextDataInjector}. + * This includes the object(s) that populate log events, but also various lookups and filters that look at + * context data to determine whether an event should be logged. + * + * Implementors should take particular note of how the different methods in the interface have different thread-safety + * guarantees to enable optimal performance. + * + * + * @see ContextData + * @see ContextDataInjectorFactory + * @see org.apache.logging.log4j.ThreadContext + * @see ThreadContextDataInjector + * @since 2.7 + */ +public interface ContextDataInjector { +/** + * Retu