my dog learned polymorphism
The moose likes Struts and the fly likes log4j propery configuration problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "log4j propery configuration problem" Watch "log4j propery configuration problem" New topic

log4j propery configuration problem

Abhilash Chander
Ranch Hand

Joined: Oct 18, 2009
Posts: 39
Hi, I am using Log4j for my applications logging. I need assitance for two of my problems.

1. I keep getting the following errors on the console

My file is located in the default source package and here is the code.

And is here is the code of my class using it

All my logging is working fine but I dont know why I am still getting these messages.

2. Secondly, this messages keeps printing on the console like 100 times in a single request

I tried to stop that logging by setting the level of my root logger to WARN and created my own logger 'com' for debug logging and set it at the top of the level heiarchy. But I am unable to stop it. Is there any other way to avoid this message from printing because its hard to find the log mesages I printed from my code.

Thanks in advance for your time.

a kishore
Ranch Hand

Joined: Sep 16, 2009
Posts: 82
Hi Mr. Chan,

I think you need to specify absolute path for you file. It should be something like this:


I hope this works

Kristof Camelbeke
Ranch Hand

Joined: Nov 28, 2001
Posts: 97
is your log4j file added in the classpath?
Kartik Talasu
Ranch Hand

Joined: Aug 21, 2009
Posts: 99
Hey.... For which version of Struts you are using?

The below info is for Struts 2
1) I had placed my file in src folder.
2) In web.xml include this code
I agree. Here's the link:
subject: log4j propery configuration problem
jQuery in Action, 3rd edition