Exemple #1
0
        public void LogSomething()
        {
            Log4netSetup.Setup();
            Log4netWrapper log = new Log4netWrapper();

            try
            {
                this.Exception();
            }
            catch (Exception ex)
            {
                log.Error("Test exception.", ex);
            }
        }
Exemple #2
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            RouteConfig.IgnoreRoutes(RouteTable.Routes);
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            FilterConfig.RegisterFilters(GlobalFilters.Filters);

            BundleConfig.RegisterBundles(BundleTable.Bundles);

            DependencyResolutionConfig.InitializeDependencyResolution();

            Log4netSetup.Setup(Server.MapPath("~/bin/log4net.config"));
            AppDomain.CurrentDomain.FirstChanceException += CurrentDomain_FirstChanceException;
        }
Exemple #3
0
 protected void Application_Start()
 {
     GlobalConfiguration.Configure(ConfigureHttp);
     Log4netSetup.Setup(Server.MapPath("~/bin/log4net.config"));
 }