ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends CLIMain.java
Date Tue, 15 Jan 2002 09:45:17 GMT
donaldp     02/01/15 01:45:17

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/frontends
                        CLIMain.java
  Log:
  Remove deprecation warning by using the thread safe implementation
  
  Revision  Changes    Path
  1.16      +6 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/CLIMain.java
  
  Index: CLIMain.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/CLIMain.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- CLIMain.java	23 Dec 2001 06:25:36 -0000	1.15
  +++ CLIMain.java	15 Jan 2002 09:45:17 -0000	1.16
  @@ -28,7 +28,8 @@
   import org.apache.log.LogTarget;
   import org.apache.log.Logger;
   import org.apache.log.Priority;
  -import org.apache.log.output.DefaultOutputLogTarget;
  +import org.apache.log.format.PatternFormatter;
  +import org.apache.log.output.io.StreamTarget;
   import org.apache.myrmidon.Constants;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  @@ -52,6 +53,8 @@
       private static final Resources REZ =
           ResourceManager.getPackageResources( CLIMain.class );
   
  +    private static final String PATTERN = "[%8.8{category}] %{message}\\n%{throwable}";
  +
       //defines for the Command Line options
       private static final int HELP_OPT = 'h';
       private static final int QUIET_OPT = 'q';
  @@ -457,8 +460,8 @@
   
           final Logger logger = Hierarchy.getDefaultHierarchy().getLoggerFor( "myrmidon"
);
   
  -        final DefaultOutputLogTarget target = new DefaultOutputLogTarget();
  -        target.setFormat( "[%8.8{category}] %{message}\\n%{throwable}" );
  +        final PatternFormatter formatter = new PatternFormatter( PATTERN );
  +        final StreamTarget target = new StreamTarget( System.out, formatter );
           logger.setLogTargets( new LogTarget[]{target} );
   
           logger.setPriority( priority );
  
  
  

--
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