This works for your example, the JUnit tests for the finder plugin.

But it didn't work for my JUnit Plug-in Test. I put the log4j.xml file in the 
SRC dir. It doesn't get it since it complains:

log4j:WARN No appenders could be found for logger 
(net.sf.swtbot.matcher.WidgetMatcherFactory$MenuMatcher).
log4j:WARN Please initialize the log4j system properly.

I solved it by passing a VM argument when starting the JUnit Plug-in Test: 
-Dlog4j.configuration=file:/c:/log4j.xml



Ketan Padegaonkar <[EMAIL PROTECTED]> wrote: On Fri, Jun 20, 2008 at 8:43 PM, 
Hans Schwaebli
 wrote:
> I know you pointed in another thread to:
> http://swtbot.svn.sourceforge.net/svnroot/swtbot/trunk/net.sf.swtbot.finder.test/src/log4j.xml
>
> I changed it there to DEBUG. But it didn't work. Nothing appeared on the
> console, although the test had run.
>
> Do I have to point to that XML file somehow or why had it not worked to log
> on the console?

I've fixed logging issues in trunk, you can pull in the latest here:
http://swtbot.sourceforge.net/artifacts/trunk. I was using commons
logging as a front to log4j. Log4j and commons logging inside eclipse
don't really work smoothly, and I'm now logging to log4j directly.

You can enable logging by putting log4j.xml in the source dir of your
plugin. The log4j configuration that I'm using logs to /tmp/debug.log.
More info about configuring log4j can be found here:
http://wiki.apache.org/logging-log4j/Log4jXmlFormat

-- Ketan

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
SWTBot-users mailing list
SWTBot-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse



       
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
SWTBot-users mailing list
SWTBot-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse

Reply via email to