Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Diagnostics not working without complain #128

Open
marufbd opened this Issue · 0 comments

1 participant

@marufbd

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:
https://gist.github.com/592679

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
cfg.Configure(dataConfig.NHibConfigPath);

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;
                                          m.AutoMappings.Add(model.Generate).ExportTo(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.