private static ServiceProviderQueryHandler CreateServiceProviderQueryHandler(ServiceProviderQueryHandler sp) { return context => { var container = new ServiceContainer(sp(context)); var config = new Dictionary<string, string>(); config["LogId"] = Configuration.ElmahLogId; var log = new Elmah.Io.ErrorLog(config); container.AddService(typeof(ErrorLog), log); return container; }; }
private static ServiceProviderQueryHandler CreateServiceProviderQueryHandler(ServiceProviderQueryHandler sp) { return(context => { var container = new ServiceContainer(sp(context)); var config = new Dictionary <string, string>(); config["LogId"] = Configuration.ElmahLogId; var log = new Elmah.Io.ErrorLog(config); container.AddService(typeof(ErrorLog), log); return container; }); }
/// <summary> /// Construct a sink that saves logs to the specified storage account. /// </summary> /// <param name="formatProvider">Supplies culture-specific formatting information, or null.</param> /// <param name="logId">The log id as found on the Elmah.io website.</param> public ElmahIOSink(IFormatProvider formatProvider, Guid logId) { _formatProvider = formatProvider; _errorLog = new ErrorLog(logId); }
/// <summary> /// Construct a sink that saves logs to the specified storage account. /// </summary> /// <param name="formatProvider">Supplies culture-specific formatting information, or null.</param> /// <param name="logId">The log id as found on the Elmah.io website.</param> public ElmahIOSink(IFormatProvider formatProvider, Guid logId) { _formatProvider = formatProvider; _errorLog = new ErrorLog(logId); }