So I started trimming down the log4j.xml file and the logging was indeed reduced.
But the strange thing was that the logging of all sql statements remained the exact same.
You can see that the trimmed file does not contain any sqlAppender any longer:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "org/apache/log4j/xml/log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
<appender name="consoleAppender" class="org.apache.log4j.ConsoleAppender">
<param name="Threshold" value="DEBUG" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c{1}] %m %n" />
</layout>
</appender>
<appender name="fileAppender" class="org.apache.log4j.RollingFileAppender">
<param name="Threshold" value="INFO" />
<param name="File" value="build.log" />
<param name="maxFileSize" value="100KB" />
<param name="maxBackupIndex" value="5" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c{1}] %m %n" />
</layout>
</appender>
<appender name="mailAppender" class="org.apache.log4j.net.SMTPAppender">
<param name="SMTPHost" value="smtp.free.fr" />
<param name="From" value="stephane@thalasoft.com" />
<param name="To" value="stephane@thalasoft.com" />
<param name="Subject" value="[LOG] Java - learnintouch " />
<param name="BufferSize" value="100" />
<param name="Threshold" value="ERROR" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE} %5p %c{1}:%L - %m%n" />
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="DEBUG" />
<param name="LevelMax" value="FATAL" />
</filter>
</appender>
<root>
<appender-ref ref="fileAppender" />
</root>
</log4j:configuration>
And still, the logging of the sql statements keeps on:
Quote:
Hibernate:
insert
into
content_import
(version, domain_name, is_importing, is_exporting, id)
values
(?, ?, ?, ?, null)
Hibernate:
call identity()
Hibernate:
select
this_.id as id99_0_,
this_.version as version99_0_,
this_.domain_name as domain3_99_0_,
this_.is_importing as is4_99_0_,
this_.is_exporting as is5_99_0_,
this_.permission_key as permission6_99_0_,
this_.permission_status as permission7_99_0_
from
content_import this_
where
this_.domain_name=?
and this_.is_importing=?
order by
this_.domain_name asc
Hibernate:
insert
into
content_import
(version, domain_name, is_importing, is_exporting, id)
values
(?, ?, ?, ?, null)
Hibernate:
call identity()
Hibernate:
insert
into
content_import
(version, domain_name, is_importing, is_exporting, id)
values
(?, ?, ?, ?, null)
Hibernate:
call identity()
Hibernate:
select
this_.id as id99_0_,
this_.version as version99_0_,
this_.domain_name as domain3_99_0_,
this_.is_importing as is4_99_0_,
this_.is_exporting as is5_99_0_,
this_.permission_key as permission6_99_0_,
this_.permission_status as permission7_99_0_
from
content_import this_
where
this_.domain_name=?
and this_.is_exporting=?
order by
this_.domain_name asc
Hibernate:
select
this_.id as id99_0_,
this_.version as version99_0_,
this_.domain_name as domain3_99_0_,
this_.is_importing as is4_99_0_,
this_.is_exporting as is5_99_0_,
this_.permission_key as permission6_99_0_,
this_.permission_status as permission7_99_0_
from
content_import this_
where
this_.domain_name=?
and this_.is_exporting=?
order by
this_.domain_name asc
Where does this sql statements logging come from ?
Is there any logging default value or behavior with Hibernate 3.6.0.Final ?