NHibernate.NLog nuget package does this. Now I use it in a project.
For completeness or when this package ever disappears or the user does not use nuget. You add this to your FluentConfiguration:
.ExposeConfiguration(c => { c.SetProperty(@"nhibernate-logger", @"Microfilm.Core.NLogFactory, Microfilm.Core"); })
ILoggerFactory
to return a class that implements IInternalLogger
. Itβs pretty simple what to include in the IInternalLogger
methods; you simply connect calls to the NHibernate registrar for NLog calls.
source share