zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abhishekrai <...@git.apache.org>
Subject [GitHub] zookeeper pull request #111: ZOOKEEPER-2574: PurgeTxnLog can inadvertently d...
Date Tue, 13 Dec 2016 12:17:42 GMT
Github user abhishekrai commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/111#discussion_r92156972
  
    --- Diff: src/java/main/org/apache/zookeeper/server/PurgeTxnLog.java ---
    @@ -108,9 +141,11 @@ public boolean accept(File f){
             // remove the old files
             for(File f: files)
             {
    -            System.out.println("Removing file: "+
    +            final String msg = "Removing file: "+
                     DateFormat.getDateTimeInstance().format(f.lastModified())+
    -                "\t"+f.getPath());
    +                "\t"+f.getPath();
    +            LOG.info(msg);
    +            System.out.println(msg);
    --- End diff --
    
    It's not ideal but they both serve a purpose that the other cannot as far as I can tell.
    
    System.out.println is useful when this is invoked directly through CLI.  The old behavior
was to provide just this.
    LOG.info is useful in that it's visible in the server log.  The old behavior did not log
this info which makes debugging through server logs harder.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message