How to initialize the log4j system properly?

2.9k views Asked by At

I tried to run sample examples for hibernate and spring but both the time I got below error.

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

I searched over net and added sample log4j file but still problem exists. Could you please help me to resolve my problem as I am quite new to this.

1

There are 1 answers

3
Remigius Stalder On

see e.g.:

http://www.mkyong.com/logging/log4j-log4j-properties-examples/

put the log4j.properties in the classpath.