-->
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.  [ 1 post ] 
Author Message
 Post subject: Where to place log4.properties file?
PostPosted: Mon Jul 13, 2009 5:09 pm 
Newbie

Joined: Sat Jul 11, 2009 12:31 am
Posts: 5
This is a follow-up / cross related to my original thread located here.

The new problem I am having is that whereas this code does work and generate a table named User in the database, the logging isn't properly set up:

Code:
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.annotations.Version).
log4j:WARN Please initialize the log4j system properly.
drop table if exists User
create table User (id bigint not null auto_increment, password varchar(255), primary key (id))


I wrote this log4j.properties file and placed it under $PROJECT_DIR_ROOT and also put it under Eclipse's build path (and it still doesn't work):

Code:
### Direct log4j properties to STDOUT ###
lo4j.appender.stdout=org.apache.log4j.ConsoleAppender
lo4j.appender.stdout.Target=System.out
lo4j.appender.stdout.layout=org.apache.log4j.PatternLayout
lo4j.appender.stdout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n

### Set Log Levels - ###
log4j.rootLogger=warn, stdout log4j.logger.org.hibernate=info

### Log JDBC Bind Parameters ###
log4j.logger.org.hibernate.type=debug

### Log schema/export update ###
log4j.logger.org.hibernate.tool.hbm2ddl=debug


Any assistance is most appreciated...


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

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.