Hi,

I'd like to commit this patch in a slightly modified form : can anybody come
up with a better name for the task/element level attribute that controls the
messages that will be output to the build log.

Meaning <task xxxxxx="Warn" /> will only output messages with level Warning
or higher (meaning Warning or Error) to the build log.

Martin called this attribute "verbosity", but I definitely don't like that.
Does anybody have other suggestions ?

Thanks,

Gert

----- Original Message ----- 
From: "Martin Aliger" <[EMAIL PROTECTED]>
To: "! nant" <[EMAIL PROTECTED]>
Sent: Wednesday, January 14, 2004 5:03 PM
Subject: [nant-dev] verbosity


> Hi all,
>
> I found some time to look into verbosity in NAnt. I think verbose=true /
> false is not sufficient control in task level. In project level you
> have -debug, -quiet and normal run.
>
> What I do in this patch, is add new attribute at element level (so enable
> use it for all tasks and types) names "verbosity". So code like this is
now
> possible:
>   <xmlpeek refid="x1" xpath="book/author/name" property="authorname"
> verbosity="Error"/>
> or
>   <exec program="foo.exe" commandline="1 2 3" failonerror="false"
> vebosity="Debug"/>
>
> First one suppress any message except errors, second one does opposite -
> turns on all messages. When no verbosity is specified, default is taken
from
> project setting - so you override -debug or -quiet option for this
specific
> task.
>
> Next use we could have from this is better control over logging when use
> task embedded in another task/function. E.g. <csc> or <resgen> from
> <solution> or <xmlpeek> task from xml::peek function:
>         [Function("peek")]
>         public string XmlPeek(string refid,string xpath) {
>             XmlPeekTask peek = new XmlPeekTask();
>             peek.Verbosity = Level.Warning;
>             ...
>         }
>
>
> I hope you will like it. All old behaviours (log4net loggers, verbose
> attribute) should work as they did before. I was also careful to do not
miss
> to comment, properly format code etc.
>
> One note: It is important to use Element.Log() not Project.Log() in all
> tasks.
>
> Regards,
> Martin
>
> btw: I dont like much how thresholds are done. Also two loggers (log.cs /
> log4net) seems to be redundant. What about to use log4net even for common
> user log messages? Why to use it only for internals. log4net could be used
> very nicely even for user output - log to file+screen, message formatting,
> cyclic logs etc etc etc...
>



-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to