ranzlee edited this page Apr 13, 2013 · 30 revisions

Target .NET Framework = 3.5, 4.0, 4.5

Glimpse.Core >= 1.2.0

--> http://nuget.org/packages/Glimpse/1.2.0

NHibernate =

--> http://nuget.org/packages/NHibernate/

screenshot 1

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.

Minimum configuration

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:


Additional configuration

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>