ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/listener CommonsLoggingListener.java
Date Fri, 12 Mar 2004 09:00:30 GMT
peterreilly    2004/03/12 01:00:30

  Modified:    .        WHATSNEW
               src/main/org/apache/tools/ant/listener
                        CommonsLoggingListener.java
  Log:
  NPE while useing -listener for commons logger.
  There is a difference between using a -logger and -listener.
  The former may use a log file and the latter does not get this set.
  The commons logger code assumes that it is passed the log stream in
  both cases.
  The fix is just to initialize the out and err streams in the commons
  logger class.
  PR: 27373
  
  Revision  Changes    Path
  1.571     +2 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.570
  retrieving revision 1.571
  diff -u -r1.570 -r1.571
  --- WHATSNEW	11 Mar 2004 23:40:59 -0000	1.570
  +++ WHATSNEW	12 Mar 2004 09:00:30 -0000	1.571
  @@ -82,6 +82,8 @@
   * regression from ant 1.5, exec task outputted two redundant trailing newlines.
     Bugzilla Report 27546.
   
  +* NPE when running commons listener. Bugzilla Report 27373.
  +
   Other changes:
   --------------
   
  
  
  
  1.11      +2 -2      ant/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java
  
  Index: CommonsLoggingListener.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- CommonsLoggingListener.java	9 Mar 2004 16:48:03 -0000	1.10
  +++ CommonsLoggingListener.java	12 Mar 2004 09:00:30 -0000	1.11
  @@ -279,8 +279,8 @@
           System.setErr(tmpErr);
       }
   
  -    PrintStream out;
  -    PrintStream err;
  +    PrintStream out = System.out;
  +    PrintStream err = System.err;
   
       public void setMessageOutputLevel(int level) {
           // Use the logger config
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message