What Martin implemented was actually a threshold (does this mean we should actually name it like that ?), allowing users (on a task level) to specify that, for example, only messages with log level Info or higher would actually be output in the build log.
We already have a "verbose" attribute. This attribute will actually increase the log level of messages with level verbose to level info, allowing tasks to output verbose messages while the project is only allowing info messages to be output. The new attribute that we're considering will only allow a user to reduce the output of a task, not increase it. Meaning, if the project is in quiet mode (only warnings and errors are output in the buildlog), then setting the loglevel to info does not have any effect as the project will not output these messages anyway. Gert ----- Original Message ----- From: "Anthony LoveFrancisco" <[EMAIL PROTECTED]> To: "'Gert Driesen'" <[EMAIL PROTECTED]> Sent: Thursday, May 06, 2004 11:52 PM Subject: RE: [nant-dev] verbosity > Some apps refer to this as "warning level" or "debug level". Why just use > "verbose" instead of "verbosity" like the Microsoft Linker? > - Ants > > | -----Original Message----- > | From: [EMAIL PROTECTED] > | [mailto:[EMAIL PROTECTED] On > | Behalf Of Gert Driesen > | Sent: Wednesday, May 05, 2004 11:36 PM > | To: Martin Aliger; ! nant > | Subject: Re: [nant-dev] verbosity > | > | 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 > > ------------------------------------------------------- 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
