RE: How to turn on logging?

2005-09-19 Thread Vincent Massol

> -Original Message-
> From: Phlip [mailto:[EMAIL PROTECTED]
> Sent: lundi 19 septembre 2005 18:13
> To: Cactus Users List
> Subject: Re: How to turn on logging?
> 
> Vincent Massol wrote:
> 
> > No, this list has nothing to do with StrutsTestCase. For StrutsTestCase
> see,
> > http://strutstestcase.sourceforge.net/. There's a link to their mailing
> > list/forums.
> 
> S'okay. They have no mailing list there, so far as I can tell. The
> closest hit in Yahoo Groups was (cough) this one.

You should really spend more time reading documentation. I have pointed you
to http://strutstestcase.sf.net and you seem not to have read that page. It
clearly and visibly points you to their forum. To make it easy for you, here
it is:

http://sourceforge.net/forum/forum.php?forum_id=121751

 
> > A long time back I had proposed to the strutstestcase project to merge
> with
> > the Cactus project but they didn't want to. That's their right and I
> > understand that. But you need to understand that they are separate
> projects.
> 
> I will have another bash at using raw Cactus without the struts
> testers, but I predict the same vicious cycle of error messages.

Nobody forces you to use Cactus at all...

-Vincent


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to turn on logging?

2005-09-19 Thread Bret Kumler
Looks like they have one to me...

http://sourceforge.net/forum/?group_id=39190

-Original Message-
From: Phlip [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 19, 2005 9:13 AM
To: Cactus Users List
Subject: Re: How to turn on logging?

Vincent Massol wrote:

> No, this list has nothing to do with StrutsTestCase. For
StrutsTestCase see,
> http://strutstestcase.sourceforge.net/. There's a link to their
mailing
> list/forums.

S'okay. They have no mailing list there, so far as I can tell. The
closest hit in Yahoo Groups was (cough) this one.

> A long time back I had proposed to the strutstestcase project to merge
with
> the Cactus project but they didn't want to. That's their right and I
> understand that. But you need to understand that they are separate
projects.

I will have another bash at using raw Cactus without the struts
testers, but I predict the same vicious cycle of error messages.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





This e-mail message and any attachments may contain private, confidential, 
proprietary or privileged material of GoldenGate Software, Inc. that is for the 
sole use of the intended recipient(s) of this e-mail message.  Any review, 
copying or distribution or other use of this e-mail message or any attachments 
hereto by anyone other than the intended recipient(s) is strictly prohibited.  
If you are not the intended recipient(s) of this e-mail message, please contact 
GoldenGate Software, Inc. (415-777-0200) immediately and permanently delete the 
original e-mail message and any copies of this e-mail message and all 
attachments, if any.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to turn on logging?

2005-09-19 Thread Phlip
Vincent Massol wrote:

> No, this list has nothing to do with StrutsTestCase. For StrutsTestCase see,
> http://strutstestcase.sourceforge.net/. There's a link to their mailing
> list/forums.

S'okay. They have no mailing list there, so far as I can tell. The
closest hit in Yahoo Groups was (cough) this one.

> A long time back I had proposed to the strutstestcase project to merge with
> the Cactus project but they didn't want to. That's their right and I
> understand that. But you need to understand that they are separate projects.

I will have another bash at using raw Cactus without the struts
testers, but I predict the same vicious cycle of error messages.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to turn on logging?

2005-09-19 Thread Vincent Massol
Hi Phlip,

> -Original Message-
> From: Phlip [mailto:[EMAIL PROTECTED]
> Sent: lundi 19 septembre 2005 16:07
> To: Cactus Users List
> Subject: Re: How to turn on logging?
> 
> Pedro Nevado wrote:
> 
> > I do not use StrutsTestCase, so I cannot help you in that respect.
> 
> Then why are you on the Cactus mailing list? Isn't that what it's for?

No, this list has nothing to do with StrutsTestCase. For StrutsTestCase see,
http://strutstestcase.sourceforge.net/. There's a link to their mailing
list/forums.

A long time back I had proposed to the strutstestcase project to merge with
the Cactus project but they didn't want to. That's their right and I
understand that. But you need to understand that they are separate projects.

Thanks
-Vincent






___ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to turn on logging?

2005-09-19 Thread Pedro Nevado
This is not a list for users of StrutsTestCase, specifically; this is why I
am in the Cactus mailing list.
Regards,
Pedro Nevado

-Mensaje original-
De: Phlip [mailto:[EMAIL PROTECTED]
Enviado el: lunes, 19 de septiembre de 2005 16:07
Para: Cactus Users List
Asunto: Re: How to turn on logging?


Pedro Nevado wrote:

> I do not use StrutsTestCase, so I cannot help you in that respect.

Then why are you on the Cactus mailing list? Isn't that what it's for?

> The code I sent you is for a log4j.xml file, not for log4j.properties
> file.
> The format of the entries are different.

I turned on logging like this:

Logger aLogger = Logger.getRootLogger();

PatternLayout layout = new PatternLayout("%d{ABSOLUTE} [%t] %-5p
%-30.30c{2} %x - %m %n");//"%d %x %t %p %l %throwable: %m%n");
File cactusFile = new File("c:/cactus.log");
if (cactusFile.isFile())
cactusFile.delete();

FileAppender aFileAppender = new FileAppender();
aFileAppender.setName("cactus_log");
aFileAppender.setFile("C:/cactus.log");

 aFileAppender.setAppend(true);
 aFileAppender.setImmediateFlush(true);
 aFileAppender.setLayout(layout);
 aFileAppender.activateOptions();
aLogger.addAppender(aFileAppender);
aLogger.setLevel(Level.DEBUG);

> I recommend you to run one very simple test, without logging to start
> with,
> and once you have everything right, add logging.

I turned it on due to this error message:

ChainedRuntimeException: Failed to get the test results at
[http://localhost:8084/Foo/ServletRedirector]

The FAQ for that error message says to turn on logging.

Now I have a big log, and I am unaware what to read in it to diagnose the
error!

--
  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]



Re: How to turn on logging?

2005-09-19 Thread Phlip

Pedro Nevado wrote:


I do not use StrutsTestCase, so I cannot help you in that respect.


Then why are you on the Cactus mailing list? Isn't that what it's for?

The code I sent you is for a log4j.xml file, not for log4j.properties 
file.

The format of the entries are different.


I turned on logging like this:

   Logger aLogger = Logger.getRootLogger();

   PatternLayout layout = new PatternLayout("%d{ABSOLUTE} [%t] %-5p 
%-30.30c{2} %x - %m %n");//"%d %x %t %p %l %throwable: %m%n");

   File cactusFile = new File("c:/cactus.log");
   if (cactusFile.isFile())
   cactusFile.delete();

   FileAppender aFileAppender = new FileAppender();
   aFileAppender.setName("cactus_log");
   aFileAppender.setFile("C:/cactus.log");

aFileAppender.setAppend(true);
aFileAppender.setImmediateFlush(true);
aFileAppender.setLayout(layout);
aFileAppender.activateOptions();
   aLogger.addAppender(aFileAppender);
   aLogger.setLevel(Level.DEBUG);

I recommend you to run one very simple test, without logging to start 
with,

and once you have everything right, add logging.


I turned it on due to this error message:

ChainedRuntimeException: Failed to get the test results at 
[http://localhost:8084/Foo/ServletRedirector]


The FAQ for that error message says to turn on logging.

Now I have a big log, and I am unaware what to read in it to diagnose the 
error!


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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to turn on logging?

2005-09-19 Thread Pedro Nevado
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]



Re: How to turn on logging?

2005-09-17 Thread Phlip
- 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]



Re: How to turn on logging?

2005-09-17 Thread Phlip

I don't think it has anything to do with jour Netbeans configuration.


NetBeans has an internal Tomcat.

However, I thought that Cactus tests mocked the server and client, so the 
only configurations they should need are the Test Libraries folder stuff.



In case it can be useful:
- 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.
- check the consistency of the references in your log4j.xml: 
appender/name,

logger/appender-ref.


I just added "commons-logging.properties", and the error message did not 
change.


Why doesn't the log4j.xml file say "Log4JLogger" anywhere. That would seem 
to be where they match.


What's the chain of events at startup time? What reads what configuration, 
and what does it do with each line?



- cactus has a client side and a server side. Check your client and server
classpaths, if you use logging in both of the sides, are properly
configured. You need configuration files for both of them.


Is there a downloadable example of the entire system, up and running, with a 
Cactus test and with logging turned on? (Googling for that returns too many 
false hits...)


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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to turn on logging?

2005-09-17 Thread Pedro Nevado
I don't think it has anything to do with jour Netbeans configuration.
In case it can be useful:
- 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.
- check the consistency of the references in your log4j.xml: appender/name,
logger/appender-ref.
- cactus has a client side and a server side. Check your client and server
classpaths, if you use logging in both of the sides, are properly
configured. You need configuration files for both of them.

Regards,
Pedro Nevado



-Mensaje original-
De: Phlip [mailto:[EMAIL PROTECTED]
Enviado el: sábado, 17 de septiembre de 2005 13:11
Para: Cactus Users List
Asunto: Re: How to turn on logging?


Pedro Nevado wrote:


> I think the problem is that you have not an appender-ref entry in your
> configuration. See below.

> 
> 
>
>
> 

Agh, this project is frying my brain. Of course I have that line; I wasn't
capable of copying the one line into this friggin' post.

So, _with_ the line, how do you get that error message. Understand I'm
stupid enough to have done _anything_ wrong, including configure NetBeans
wrong, or use its bundled Tomcat, or leave out some silly Jar file...

--
  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]



Re: How to turn on logging?

2005-09-17 Thread Phlip

Pedro Nevado wrote:



I think the problem is that you have not an appender-ref entry in your
configuration. See below.





   
   



Agh, this project is frying my brain. Of course I have that line; I wasn't 
capable of copying the one line into this friggin' post.


So, _with_ the line, how do you get that error message. Understand I'm 
stupid enough to have done _anything_ wrong, including configure NetBeans 
wrong, or use its bundled Tomcat, or leave out some silly Jar file...


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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to turn on logging?

2005-09-17 Thread Pedro Nevado
I think the problem is that you have not an appender-ref entry in your
configuration. See below.
Regards,
Pedro Nevado
















-Mensaje original-
De: Phlip [mailto:[EMAIL PROTECTED]
Enviado el: sábado, 17 de septiembre de 2005 8:29
Para: Cactus Users List
Asunto: Re: How to turn on logging?


Pedro Nevado wrote:

> In my development environment, in src/ I have a log4j.xml file with the
> entry
>
> 
>
>
> 

Muchismas gracias! Now...

log4j:WARN No appenders could be found for logger
(org.apache.cactus.internal.configuration.ConfigurationInitializer).

My entire, dirt-simple log4j.xml file is this:





  




  

  



 

  

  


What's wrong with it? (And was there a real reason the error message
couldn't be more specific??)

--
  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]



Re: How to turn on logging?

2005-09-16 Thread Phlip

Pedro Nevado wrote:


In my development environment, in src/ I have a log4j.xml file with the
entry


   
   



Muchismas gracias! Now...

log4j:WARN No appenders could be found for logger 
(org.apache.cactus.internal.configuration.ConfigurationInitializer).


My entire, dirt-simple log4j.xml file is this:





 
   
   
   
   
 

   
 


   


 
   
 


What's wrong with it? (And was there a real reason the error message 
couldn't be more specific??)


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



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to turn on logging?

2005-09-06 Thread Pedro Nevado
In my development environment, in src/ I have a log4j.xml file with the
entry






This file goes through build/ to dist/ once I build my application.
Regards,
Pedro Nevado

-Mensaje original-
De: Phlip [mailto:[EMAIL PROTECTED]
Enviado el: martes, 06 de septiembre de 2005 1:57
Para: cactus-user@jakarta.apache.org
Asunto: How to turn on logging?


Cactusers:

Ogle this documentation:

http://jakarta.apache.org/cactus/integration/manual/howto_config.html#loggin
g

After describing how wonderfully complex logging is, it says, "Cactus
provides an optional cactus.logging.config configuration property."

What file does this property go in? What's a simple example that turns on
logging?

Then the documentation has two big sections under "Sample logging
configuration files".

They don't specify what the names of these files are, or where they go in
your file tree.

A little help?

--
  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]