예제 #1
0
        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;
            };
        }
예제 #2
0
        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;
            });
        }
예제 #3
0
 /// <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);
 }
예제 #4
0
 /// <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);
 }