jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pedro Nevado" <pnev...@javato.com>
Subject RE: How to turn on logging?
Date Mon, 19 Sep 2005 07:40:50 GMT
Phlip,

I do not use StrutsTestCase, so I cannot help you in that respect.
The code I sent you is for a log4j.xml file, not for log4j.properties file.
The format of the entries are different.
Cactus does not mock an application server; in fact, it needs an application
(web) server started and running (you can do that with your ant build.xml
file or starting the server integrated in your IDE).
I recommend you to run one very simple test, without logging to start with,
and once you have everything right, add logging.
Regards,
Pedro Nevado

-----Mensaje original-----
De: Phlip [mailto:phlip2005@gmail.com]
Enviado el: sábado, 17 de septiembre de 2005 21:38
Para: Cactus Users List
Asunto: Re: How to turn on logging?


> - check you have a commons-logging.properties file in your src/ (and in
> your
> futher dist/your_app/WEB-INF/classes) with something like:
>
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger.

Per my other mail, that didn't work. Here's what did.

Download the source to the book /Apache Tomcat Bible/.

Open chapter 17\hello-log4j

Change the "log4j.appender.A1.File" line to "c:/cactus_log4j.txt"

Copy the file log4j.properties to build/test/classes

Copy the file log4j.properties to build/web/WEB-INF/classes

(Note I don't care which one did it...)

Now when I run, the file "c:/cactus_log4j.txt" appears and contains nothing,
and the console logger reveals this:

testExecute(enforcer.actions.LoginActionTest)java.net.ConnectException:
Connection refused: connect

So, now I just need to check my program can run its Login.do action, and
stuff, to see why it was unconnectable.

I thought this Cactus stuff ran client-side, and mocked the servlet stuff.
Should I switch back to MockStrutsTestCase?

> --
>  Phlip
>  http://www.greencheese.org/ZeekLand  <-- NOT a blog!!!


---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org




Mime
View raw message