You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is "nhibernate-logger" setting, which is read from app.config or web.config.
But in .ASP.Net Core, app.config does not exist. There is appsettings.json only. Would it be possible to set nhibernate-logger from NHibernate.Cfg.Environment, from hibernate.cfg.xml or programmaticaly?
There is workaround how to copy settings from appsettings.json to ConfigurationManager, but this is not clean solution here
The code for reading nhibernate-logger is in NHibernateLogger
privatestaticstringGetNhibernateLoggerClass(){varnhibernateLogger=ConfigurationManager.AppSettings.Keys.Cast<string>().FirstOrDefault(k =>nhibernateLoggerConfKey.Equals(k,StringComparison.OrdinalIgnoreCase));stringnhibernateLoggerClass=null;if(string.IsNullOrEmpty(nhibernateLogger)){// look for log4net.dll// other code... }returnnhibernateLoggerClass;}