-->
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.  [ 4 posts ] 
Author Message
 Post subject: log4j properties file
PostPosted: Thu Jul 15, 2004 4:12 am 
Newbie

Joined: Wed Jul 07, 2004 5:35 am
Posts: 7
Location: L
hey there,

i have a problem with my log4j.properties file. By executing my programm i get the following error messages:

--------------------------------------------------------------

log4j:WARN No appenders could be found for logger (net.sf.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.

--------------------------------------------------------------

The file lies below my class.root. If i put it into the class.root i works fine. Must that file be in the class.root? Or how can i tell hibernate to find it where else as in the class.root? Maybe over the Configuration.addProperties() method?

Thankx in advance

Angry Angel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 15, 2004 8:57 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Check the commons logging doc on that subject.
You can but the log4j config file anywhere but it has to be declared in the commons-logging.properties... which need to be in the classpath root

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 16, 2004 4:10 am 
Beginner
Beginner

Joined: Fri Jul 16, 2004 3:21 am
Posts: 40
Put a log4j.xml file in your classpath:

exaples:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "./log4j.dtd">

<log4j:configuration>

<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.TTCCLayout"/>
</appender>

<root>
<priority value ="debug" />
<appender-ref ref="console"/>
</root>

</log4j:configuration>

and also the log4j.dtd

rgds pfenn


Top
 Profile  
 
 Post subject: thanks
PostPosted: Fri Jul 16, 2004 6:22 am 
Newbie

Joined: Wed Jul 07, 2004 5:35 am
Posts: 7
Location: L
thank you guys. now it is running.

cu

angel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.