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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
