An ErrorLog implementation that uses XML files stored on disk as its backing store.
Inheritance: Elmah.ErrorLog
Exemplo n.º 1
0
 void Application_PostRequestHandlerExecute(Object sender, EventArgs e)
 {
     #if DEBUG
     #else
     // Get Elmah to log all our post requests
     string postlogpath = System.Configuration.ConfigurationManager.AppSettings["PostLogPath"] ?? HttpContext.Current.Request.PhysicalApplicationPath + "/PostLogs/";
     Elmah.XmlFileErrorLog xmlErrorLog = new Elmah.XmlFileErrorLog(postlogpath);
     xmlErrorLog.Log(new Elmah.Error(new Exception("POST"), System.Web.HttpContext.Current));
                 #endif
 }
Exemplo n.º 2
0
        private static IServiceProvider ElmahServiceProviderQueryHandler(object context)
        {
            var container = new ServiceContainer(context as IServiceProvider);
            var log = new XmlFileErrorLog(HttpContext.Current.Server.MapPath("~/KIM_ELAMH/"));
            log.ApplicationName = "SysCore";
            container.AddService(typeof(ErrorLog), log);

            // var mail=Elmah.m
            return container;
        }