Skip to content

Instantly share code, notes, and snippets.

@glennblock
Last active August 29, 2015 14:18
Show Gist options
  • Save glennblock/cf2236b5edfaceb18240 to your computer and use it in GitHub Desktop.
Save glennblock/cf2236b5edfaceb18240 to your computer and use it in GitHub Desktop.
private static void BatchLoggingByInterval()
{
_listener = new HttpInputTraceListener(_host, _token, batchInterval:60000);
_traceSource.Listeners.Add(_listener);
for (int i = 1; i <= 5; i++)
_traceSource.TraceEvent(TraceEventType.Information, i, string.Format("Boris {0}", i));
Console.Prompt("Logged 5 events, data will be delayed by 10 seconds, press enter to continue");
}
private static void BatchLoggingByInterval()
{
_listener = new HttpInputTraceListener(_host, _token, batchInterval:60000);
_traceSource.Listeners.Add(_listener);
for (int i = 1; i <= 5; i++)
_traceSource.TraceEvent(TraceEventType.Information, i, string.Format("Boris {0}", i));
Console.WriteLine("Logged 5 events, data will be delayed by 10 seconds, press enter to continue");
Console.ReadLine();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment