File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Testing and the fly likes logging every method on stdout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "logging every method on stdout" Watch "logging every method on stdout" New topic

logging every method on stdout

Kamal Ahmed
Ranch Hand

Joined: Feb 15, 2005
Posts: 91

I have a BaseTest Class with the log4j logger as:

Now, in the test class, i call :

Now, when i run the testMethod() i SHOULD get a Log4J Logging statement on stdout

but, i am not getting Anything on stdout , Any ideas?

Hongli Li
Ranch Hand

Joined: Oct 29, 2006
Posts: 124
is the on the classpath?

Do you know why this cup is useful? Because it is empty.
Kamal Ahmed
Ranch Hand

Joined: Feb 15, 2005
Posts: 91
Hongli Li,

You are right on the dot.

I was not seeing the message because the logging level in log4j.xml was set to WARN

Thanks for the tip
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: logging every method on stdout
Similar Threads
log4j and apache.commons.logging
A Log4j Stumper, can't get logs in the right place.
Java cookies ?
Need help with log4j logging tool to log into database