Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Diagnostics not working without complain #128

marufbd opened this Issue · 0 comments

1 participant


This code snippet produces the exported hbm without any error, even i can execute the sql prom schemaexport.
The only thing that is not working and without any complain is the Diagnostics whereas it should produce output like:

I have tried changing the OutputToConsole which should register a listener. And its taking any invalid path to OutputToFile and does not produce any exception. Just not working.

var cfg = new NHibernate.Cfg.Configuration();
//nhibernate config from config file

FluentConfiguration fConfig = Fluently.Configure(cfg)                
                .Mappings(m =>
                                      //get default persistent model generator
                                      var model =
                                          new AutoPersistenceModelGenerator(overrideAssembly)
                                              {AutoMappingAssemblies = autoMappingAssemblies};

                                      if (config.ExportHbm)
                                          var hbmExportPath = dataConfig.HbmExportPath;

//this line does not provide any output
fConfig.Diagnostics(x => x.Enable().OutputToFile("D:/tmp/fluentNHibernate_log.txt"));

Configuration = fConfig.BuildConfiguration();

Factory = Configuration.BuildSessionFactory();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.