ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <j_a_fernan...@yahoo.com>
Subject Re: Speaking of deprecation...
Date Tue, 12 Feb 2002 16:21:36 GMT
 --- Magesh Umasankar <umagesh@apache.org> wrote: >
From: "Conor MacNeill"
> <conor@cortexebusiness.com.au>
> 
> Please find attached a patch that introduces
> -deprecation to the command line. 
> Project.MSG_DEPRECATED
> is introduced between INFO & VERBOSE.
> 

I do not think DEPRECATION should be in the same scale
as regular messages. To me -deprecation should present
the deprecated messages independently of the levels of
logging. 

> As I have modified the value of some public static
> finals,
> viz. Project.DEBUG and Project.VERBOSE, mandatory
> recompiling of all of Ant's source code is needed.
> If you can suggest a cleaner way to do this and
> avoid
> this penalty, I am all ears.
> 

Do not associate deprecation with log levels,
in other words, the inclusion of exclusion of
deprecation is separate. You could acheive this with
something like:

   void log(String msg, int level) {
     if (level == MSG_DEPRECATED) {
        if (!deprecationIsOn()) return;
        level = MSG_ERROR;
     }
     // original log code
   }

This means you can use for MSG_DEPRECATED some value
outside the regular flags, like '-1'.

Jose Alberto


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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