ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant ProjectComponent.java
Date Thu, 22 Aug 2002 17:31:15 GMT
costin      2002/08/22 10:31:15

  Modified:    src/main/org/apache/tools/ant ProjectComponent.java
  Log:
  If no logger is set, default to system.out instead of ignoring the
  message.
  
  This happens when ant is embeded ( if no logger is set ).
  
  Revision  Changes    Path
  1.6       +6 -0      jakarta-ant/src/main/org/apache/tools/ant/ProjectComponent.java
  
  Index: ProjectComponent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectComponent.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ProjectComponent.java	23 Jul 2002 07:54:46 -0000	1.5
  +++ ProjectComponent.java	22 Aug 2002 17:31:15 -0000	1.6
  @@ -115,6 +115,12 @@
       public void log(String msg, int msgLevel) {
           if (project != null) {
               project.log(msg, msgLevel);
  +        } else {
  +            // 'reasonable' default, if the component is used without
  +            // a Project ( for example as a standalone Bean ).
  +            // Most ant components can be used this way.
  +            if( msgLevel >= Project.MSG_INFO )
  +                System.err.println( msg );
           }
       }
   }
  
  
  

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


Mime
View raw message