-
Notifications
You must be signed in to change notification settings - Fork 15
NHibernate.Glimpse
--> http://nuget.org/packages/Glimpse/1.2.0
--> http://nuget.org/packages/NHibernate/3.3.3.4000
The only NHibernate configuration automatically overridden is the LoggerFactory (in appSettings). This was primarily to avoid a dependency on Log4Net.
By default, SQL, IDbCommand, IDataReader, IDbConnection, IDbTransaction, entity load, and flush logging is provided.
Add this appSettings key and value to enable the logging sinks:
<add key="NHibernate.Glimpse.Loggers" value="command,connection,flush,load,transaction"/>
Note: this setting is added automatically if installed via NuGet.
Also add to appSettings:
<add key="nhibernate-logger" value="NHibernate.Glimpse.LoggerFactory, NHibernate.Glimpse"/>
You also need to register the factory after building it:
NHibernate.Glimpse.Plugin.RegisterSessionFactory(YourSessionFactory);
Add this NHibernate SessionFactory configuration property to make the SQL pretty ;)
<property name="format_sql">true</property>
Add this NHibernate SessionFactory configuration property to track factory statistics.
<property name="generate_statistics">true</property>