ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gle...@ca.ibm.com
Subject RE: [PATCH]? Jcvs taskdef
Date Thu, 01 Jun 2000 13:09:20 GMT




Might I also suggest that you should use the project.log(...) methods for
writing state messages from your uiDisplayProgressMsg,
uiDisplayProgramError, and uiDisplayResponse methods.  For example, you
probably would want a call like

public void uiDisplayProgressMsg(String message) {
    project.log( message, "jcvs", project.MSG_VERBOSE );
}

and

public void uiDisplayProgramError( String message ) {
    project.log( message, "jvcs:error", project.MSG_ERR );
}

These logging methods provide a nice, consistent interface to logging in
Ant.  Yes, given the way its implemented in Project, System.out is
redirected to the log file, but it doesn't have to be.  By using the
project.log(...) methods you aren't relying on the implementation, but
rather the interface.

My $0.02.

Glenn McAllister
TID - Software Developer - VisualAge for Java
IBM Toronto Lab, (416) 448-3805
"An approximate answer to the right question is better than the
right answer to the wrong question." - John W. Tukey

[ Lots of good stuff snipped ]

>
>         //
>         // CVS USER INTERFACE METHODS
>         //
>
>         public void uiDisplayProgressMsg( String message ) {
>                 System.out.println("[exec] " + message);
>         }
>
>         public void        uiDisplayProgramError( String error ) {
>                 System.out.println("[error] " + error);
>         }
>
>         public void uiDisplayResponse( CVSResponse response ) {
>         }
>
>         //
>         // END OF CVS USER INTERFACE METHODS
>         //
>
> }
>
>





Mime
View raw message