Hi, just ran stress test against my NHibernate application. The hard drive quickly filled up. After investigation I found a bunch of log files under:
C:\WINDOWS\system32\inetsrv
They have names like "InetpubwwwrootSomeWebbinlog.txt2006.02.15". Upon inspection of the file, I am getting log entries like:
2006-02-15 08:23:22,812 [1300] DEBUG NHibernate.Cfg.Configuration [] <> - connection.provider=NHibernate.Connection.DriverConnectionProvider
2006-02-15 08:23:22,828 [1300] DEBUG NHibernate.Cfg.Configuration [] <> - connection.driver_class=NHibernate.Driver.SqlClientDriver
2006-02-15 08:23:22,828 [1300] DEBUG NHibernate.Cfg.Configuration [] <> - connection.connection_string=Server=localhost;initial catalog=SOMEDB;uid=SOMEUSER; pwd=secret; Connect Timeout=15;
2006-02-15 08:23:22,828 [1300] DEBUG NHibernate.Cfg.Configuration [] <> - show_sql=true
2006-02-15 08:23:22,828 [1300] DEBUG NHibernate.Cfg.Configuration [] <> - dialect=NHibernate.Dialect.MsSql2000Dialect
2006-02-15 08:23:22,828 [1300] DEBUG NHibernate.Cfg.Configuration [] <> - use_outer_join=true
2006-02-15 08:23:22,828 [1300] DEBUG NHibernate.Cfg.Configuration [] <> - query.substitutions=true 1, false 0, yes 'Y', no 'N'
2006-02-15 08:23:22,828 [1300] DEBUG NHibernate.Cfg.Configuration [] <> - connfactory.XXX<-SomeLib
2006-02-15 08:23:22,828 [1300] INFO NHibernate.Cfg.Configuration [] <> - searching for mapped documents in assembly: SomeLib
2006-02-15 08:23:22,828 [1300] INFO NHibernate.Cfg.Configuration [] <> - Found mapping documents in assembly: some_obj.hbm.xml
2006-02-15 08:23:22,859 [1300] INFO NHibernate.Dialect.Dialect [] <> - Using dialect: NHibernate.Dialect.MsSql2000Dialect
...
...
2006-02-15 08:23:24,828 [1300] DEBUG NHibernate.Impl.SessionImpl [] <> - scheduling collection removes/(re)creates/updates
2006-02-15 08:23:24,828 [1300] DEBUG NHibernate.Impl.SessionImpl [] <> - Processed 0 for recreate (0), remove (0), and update (0)
2006-02-15 08:23:24,828 [1300] DEBUG NHibernate.Impl.SessionImpl [] <> - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
2006-02-15 08:23:24,828 [1300] DEBUG NHibernate.Impl.SessionImpl [] <> - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2006-02-15 08:23:24,828 [1300] DEBUG NHibernate.Impl.SessionImpl [] <> - dont need to execute flush
2006-02-15 08:23:24,828 [1300] DEBUG NHibernate.Hql.QueryTranslator [] <> - HQL: select distinct vd.ProdTypeCode, vd.XXX from XXXX vd
2006-02-15 08:23:24,828 [1300] DEBUG NHibernate.Hql.QueryTranslator [] <> - SQL: select distinct XXX.XXX as x0_0_, XXX.XXX as x1_0_ from XXX
...
I realize NHibernate is logging everything...
I don't remember I configure NHibernate to log, here's NHibernate config section in web.config:
<nhibernate>
<add
key="hibernate.connection.provider"
value="NHibernate.Connection.DriverConnectionProvider"
/>
<add
key="hibernate.dialect"
value="NHibernate.Dialect.MsSql2000Dialect"
/>
<add
key="hibernate.connection.driver_class"
value="NHibernate.Driver.SqlClientDriver"
/>
<add
key="hibernate.connection.connection_string"
value="Server=localhost;initial catalog=SOMEDB;uid=SOMEUSER; pwd=secret;"
/>
</nhibernate>
And, here's my someapp.cfg.xml
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0" >
<session-factory name="connfactory.someapp">
<!-- properties -->
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">Server=localhost;initial catalog=SOMEDB;uid=SOMEUSER; pwd=secret; Connect Timeout=15;</property>
<property name="show_sql">true</property>
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
<property name="use_outer_join">true</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<!-- mapping files -->
<mapping assembly="SomeLib" />
</session-factory>
</hibernate-configuration>
How do I stop logging?
|