logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1692) putAll() method for CloseableThreadContext
Date Fri, 11 Nov 2016 17:02:58 GMT

    [ 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<String, String> 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


Mime
View raw message