Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7C5CD200BE0 for ; Fri, 11 Nov 2016 18:03:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7B09E160B01; Fri, 11 Nov 2016 17:03:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CFF32160B14 for ; Fri, 11 Nov 2016 18:02:59 +0100 (CET) Received: (qmail 72152 invoked by uid 500); 11 Nov 2016 17:02:58 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 72051 invoked by uid 99); 11 Nov 2016 17:02:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2016 17:02:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8090C2C4C79 for ; Fri, 11 Nov 2016 17:02:58 +0000 (UTC) Date: Fri, 11 Nov 2016 17:02:58 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LOG4J2-1692) putAll() method for CloseableThreadContext MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 11 Nov 2016 17:03:00 -0000 [ https://issues.apache.org/jira/browse/LOG4J2-1692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15657528#comment-15657528 ] ASF GitHub Bot commented on LOG4J2-1692: ---------------------------------------- Github user mikaelstaldal commented on a diff in the pull request: https://github.com/apache/logging-log4j2/pull/48#discussion_r87620512 --- Diff: log4j-api/src/main/java/org/apache/logging/log4j/CloseableThreadContext.java --- @@ -128,6 +153,37 @@ public Instance put(final String key, final String value) { } /** + * Populates the Thread Context Map with the supplied key/value pairs. Any existing keys in the + * {@link ThreadContext} will be replaced with the supplied values, and restored back to their original value when + * the instance is closed. + * + * @param values The map of key/value pairs to be added + * @return a new instance that will back out the changes when closed. + * @since 2.7.1 --- End diff -- The next version will be 2.8. > putAll() method for CloseableThreadContext > ------------------------------------------ > > Key: LOG4J2-1692 > URL: https://issues.apache.org/jira/browse/LOG4J2-1692 > Project: Log4j 2 > Issue Type: Improvement > Components: API > Affects Versions: 2.6 > Reporter: Greg Thomas > Priority: Minor > > The ThreadContext supports a putAll(final Map m) method. > It would be useful, particularly when using thread pools, to have a similar method for the CloseableThreadContext. > Similarly, a pushAll() method would be useful. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org