[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15823410#comment-15823410
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2659:
-------------------------------------------

Github user jvz commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/148#discussion_r96145357
  
    --- Diff: 
src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java ---
    @@ -413,13 +418,18 @@ public void testBadPeerAddressInQuorum() throws 
Exception {
             ClientBase.setupTestEnv();
     
             // setup the logger to capture all logs
    +        LoggerContext loggerContext =  (LoggerContext) 
LogManager.getContext(false);
    --- End diff --
    
    If this test is just storing log messages for verification at the end of 
the test, then I recommend using log4j-core:test's `LoggerContextRule` and 
`ListAppender`. Example: 
[LoggerTest](https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java),
 
[config.xml](https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/test/resources/log4j-test2.xml)
 (see the `<List name="foo"/>` appender configs). This way, the test won't 
break if internal details of log4j-core change.


> Use log4j2 as a logging framework as log4j 1.X is now deprecated
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2659
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2659
>             Project: ZooKeeper
>          Issue Type: Wish
>            Reporter: Pushkar Raste
>            Priority: Minor
>         Attachments: zk_log4j2_migration.patch
>
>
> Zookeeper currently uses {{log4j 1.X}} as the default logging framework. 
> {{log4j 1.X}} is now deprecated http://logging.apache.org/log4j/1.2/
> This ticket is to track efforts to move zookeeper to {{log4j2}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to