-->
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.  [ 2 posts ] 
Author Message
 Post subject: need help with log4j:D
PostPosted: Sat Jan 22, 2011 2:19 pm 
Newbie

Joined: Sat Jan 22, 2011 2:14 pm
Posts: 1
hi every body ,
i am working with myeclipse ,
and i'm working on hibernate ,
as you know my eclipse automaticaly connects to data base,
i connected it and when using session and putting data in data base,
i get this log4j error,
what is this exactly?!?
and also i wanted to know about reverse engineering....
the error i get is:
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.


Top
 Profile  
 
 Post subject: Re: need help with log4j:D
PostPosted: Sun Jan 23, 2011 2:49 pm 
Newbie

Joined: Sun Jan 23, 2011 2:29 pm
Posts: 3
Do you have a log4j.properties file in the root of your source/classes dirs? Here is mine. Perhaps you can adapt it:

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

# Root logger option
log4j.rootLogger=INFO, stdout

log4j.logger.org.springframework.web.context.ContextLoader=INFO

# logs the SQL statements
log4j.logger.org.hibernate.SQL=DEBUG

# Logs the JDBC parameters passed to a query
log4j.logger.org.hibernate.type=INFO

# By default we don't log at the DEBUG level for Cactus log, in order not to generate too
# many logs. However, should a problem arise and logs need to be sent to the Cactus dev team,
# then we will ask you to change this to DEBUG.
log4j.category.org.apache.cactus = INFO
log4j.additivity.org.apache.cactus=false

# Don't show debug logs for HttpClient
log4j.category.org.apache.commons.httpclient=INFO
log4j.additivity.org.apache.commons.httpclient=false

log4j.category.org.apache.myfaces.orchestra=INFO

log4j.logger.org.springframework.web.context=INFO


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