[Webtest] Log levels not recognized!?

Denis N. Antonioli Denis N. Antonioli" <denis.antonioli@canoo.com
Wed, 23 May 2007 10:39:19 +0200


Hi Marcel

I know it's a silly question, but are you sure you're editing the =20
correct log4j.properties?

Unless told otherwise, log4j picks the first log4j.properties on its =20
classpath.
Since some projects includes their own property files, this can be =20
confusing ;-)

Since webtest build R_1523 (2007-03-20), the webtest shell/batch =20
scripts set
the java property log4j.configuration to be sure that the correct =20
file is selected.


Are you using the webtest.[bat|sh] scripts provided in the release?


Best
	dna

On 22 mai 07, at 15:00, Marcel St=F6r wrote:

> In certain cases the defined log levels don't seem to be =20
> recognized. My
> global level is ERROR and still I see INFO messages and their =20
> stacktraces:
>
>    [invoke] 22.05.2007 13:51:41
> org.apache.commons.httpclient.HttpMethodDirector isRedirectNeeded
>    [invoke] INFO: Redirect requested but followRedirects is disabled
> [...yadayada...]
> 100s of lines of stacktrace prefixed with [clickButton].
>
> ThrowExceptionOnScriptError is false in my config.
>
> Below is my log4j.properties content:
>
>
> # Define some properties used within this file
> # these properties may be overriden by system properties allowing to
> change log level without editing this file
> # ex:
> #   ANT_OPTS=3D"-DlogLevel.root=3Ddebug"
> #	ant myWebTest.xml
> # or
> #   ANT_OPTS=3D"-DlogLevel.httpclientWire=3Ddebug -=20
> DlogLevel.htmlunit=3Ddebug"
> #	ant myWebTest.xml
> #
> # For precise configuration of the log levels used, the best way is
> still to edit this file
>
> # Possible levels: OFF, FATAL, ERROR, WARN, INFO, DEBUG and ALL.
> # http://logging.apache.org/log4j/docs/api/org/apache/log4j/Level.html
> logLevel.root=3DERROR
> logLevel.webtest=3D${logLevel.root}
> logLevel.htmlunit=3D${logLevel.root}
> logLevel.httpclientWire=3D${logLevel.root}
>
> ## standard way of logging
> log4j.rootCategory=3D${logLevel.root}, stdout
>

--=20
Beware of the man who works hard to learn something, learns it, and =20
finds
himself no wiser than before," Bokonon tells us.  "He is full of =20
murderous
resentment of people who are ignorant without having come by their
ignorance the hard way.
   -- Kurt Vonnegut, "Cat's Cradle"