-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: using log4j
PostPosted: Wed Mar 08, 2006 8:20 am 
Newbie

Joined: Wed Mar 08, 2006 8:11 am
Posts: 17
Location: Israel
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.0.5

I am having trouble accessing my hibernate logs in my log4j log file. after trying to trace into the hibernate methods instead, I noticed hibernate is sending the logs to jdk14logger, through the common.logging
Reading in the Hibernate in Action book I saw that putting a log4j.properties file at the project's folder should be enough for the common.logging to use log4j - am I missing something? I also use log4j.xml file instead of the properties, and anyway, I get any other log messages from my own code to my log file. What am I missing here?


Top
 Profile  
 
 Post subject: Re: using log4j
PostPosted: Wed Mar 08, 2006 8:29 am 
Regular
Regular

Joined: Tue Mar 07, 2006 11:18 am
Posts: 54
Location: Berlin
Hi,
does the log4j logger work at all? Is the log4j.properties file in your classpath? Actually commons logging does use youer log4j.properties eg. log4j if there is a log4j.properties file in your classpath.

see this section:

http://jakarta.apache.org/commons/logging/guide.html#Configuring%20Log4J

I think just to put your file into the project folder is not enought :).


simon[/url]


Top
 Profile  
 
 Post subject: Post subject: Re: using log4j
PostPosted: Fri Mar 17, 2006 3:58 pm 
Newbie

Joined: Fri Mar 17, 2006 3:54 pm
Posts: 6
Hi,

The only way I got this to work is to start ant like this:

ant -lib path_to_folder_where_log4j.properties_is


Hope it helps.

Nicolas


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.