This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "logging every method on stdout" Watch "logging every method on stdout" New topic
Author

logging every method on stdout

Kamal Ahmed
Ranch Hand

Joined: Feb 15, 2005
Posts: 91
Hi,

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?

Thanks,
-Kamal.
Hongli Li
Ranch Hand

Joined: Oct 29, 2006
Posts: 124
is the log4j.properties 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: logging every method on stdout
 
Similar Threads
A Log4j Stumper, can't get logs in the right place.
log4j...
Java cookies ?
log4j and apache.commons.logging
Need help with log4j logging tool to log into database