SalesBuy
1-855-856-7678
Technical SupportSupport
/** @property */ public TimeSpan get_ScheduledTransferPeriod () /** @property */ public void set_ScheduledTransferPeriod (TimeSpan value)
public function get ScheduledTransferPeriod () : TimeSpan public function set ScheduledTransferPeriod (value : TimeSpan)
The ScheduledTransferPeriod property is used to set how frequently a data buffer will transfer local logging data to persistent storage. By default, this property is not set for any data buffer to prevent unintentional storage costs.
The value you set for this property will be rounded up to the nearest minute. Therefore, the minimum transfer period you can specify is 1 minute.
Example
The following code snippet sets the transfer period of a Windows event log buffer to 1 minute.
// Get the default initial configuration for DiagnosticMonitor. DiagnosticMonitorConfiguration diagnosticConfiguration = DiagnosticMonitor.GetDefaultInitialConfiguration(); // Filter the logs so that only error-level logs are transferred to persistent storage. diagnosticConfiguration.WindowsEventLog.ScheduledTransferLogLevelFilter = LogLevel.Error; // Schedule a transfer period of 30 minutes. diagnosticConfiguration.WindowsEventLog.ScheduledTransferPeriod = TimeSpan.FromMinutes(30.0);