Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

log4j level has a null value

807591Jun 13 2008
Hello. I�ve been having a little trouble with log4j. I have an application in which the Actions (struts) all have the log4j declaration (private static Logger logger = Logger.getLogger(Restaurants.class);). In the log4j.properties the level is set to �debug�. Then, in the Actionservlet it is set again to �all�. The problem is that sometimes when the program gets executed and enters to some methods, the level (getlevel()) has a null value. Why is this and how can it be resolved? I could put the first line of every method �logger.setLevel(�ALL�)�, but it wouldn�t be a good solution. Any tips? Thanks a lot.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 11 2008
Added on Jun 13 2008
0 comments
456 views