Important notice: the property (part of hibernate configuration, NOT part of logging framework config!)
hibernate.show_sql
controls the logging directly to STDOUT bypassing any logging framework (which you can recognize by the missing output formatting of the messages). If you use a logging framework like log4j, you should always set that property to false because it gives you no benefit at all.
That circumstance irritated me quite a long time because I never really cared about it until I tried to write some benchmark regarding Hibernate.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…