示例#1
0
 /// <summary>
 /// Construct a sink that saves logs to the specified storage account. Properties are being send as data and the level is used as tag.
 /// </summary>
 /// <param name="batchSizeLimit">The maximum number of events to post in a single batch.</param>
 /// <param name="period">The time to wait between checking for event batches.</param>
 ///  <param name="formatProvider">Supplies culture-specific formatting information, or null.</param>
 /// <param name="logglyConfig">Used to configure underlying LogglyClient programmaticaly. Otherwise use app.Config.</param>
 /// <param name="includes">Decides if the sink should include specific properties in the log message</param>
 public LogglySink(IFormatProvider formatProvider, int batchSizeLimit, TimeSpan period, LogglyConfiguration logglyConfig, LogIncludes includes)
     : base(batchSizeLimit, period)
 {
     if (logglyConfig != null)
     {
         _adapter = new LogglyConfigAdapter();
         _adapter.ConfigureLogglyClient(logglyConfig);
     }
     _client    = new LogglyClient();
     _converter = new LogEventConverter(formatProvider, includes);
 }
示例#2
0
 public LogglyFormatter(IFormatProvider formatProvider)
 {
     //the converter should receive the format provider used, in order to
     // handle dateTimes and dateTimeOffsets in a controlled manner
     _converter = new LogEventConverter(formatProvider);
 }
 /// <summary>
 /// Construct a sink that saves logs to the specified storage account. Properties are being send as data and the level is used as tag.
 /// </summary>
 /// <param name="batchSizeLimit">The maximum number of events to post in a single batch.</param>
 /// <param name="period">The time to wait between checking for event batches.</param>
 ///  <param name="formatProvider">Supplies culture-specific formatting information, or null.</param>
 public LogglySink(IFormatProvider formatProvider, int batchSizeLimit, TimeSpan period)
     : base(batchSizeLimit, period)
 {
     _client    = new LogglyClient();
     _converter = new LogEventConverter(formatProvider);
 }