private static void RegisterLoggerType(IUnityContainer container)
        {
            bool isDebugLevel = false;

            if (WebConfigurationManager.AppSettings.AllKeys.Contains("DebugLevel"))
            {
                isDebugLevel = bool.Parse(WebConfigurationManager.AppSettings["DebugLevel"]);
            }

            container.RegisterType <NLogLogger>(
                new InjectionFactory(c => NLogLogger.Create(isDebugLevel))
                );
            container.RegisterType <ILogger, NLogLogger>();
        }
Exemple #2
0
 public Configuration()
 {
     AutomaticMigrationsEnabled = false;
     ContextKey = "Nanobank.API.DAL.ApplicationContext";
     _looger    = NLogLogger.Create(true);
 }