protected EventSourceBase() { var listener = new ObservableEventListener(); listener.EnableEvents(this, Verbosity, Keywords.All); listener.LogToSystemDiagnosticsTrace(); //application diagnostics will upload these to azure tables if (SiteUtil.InWebJob) { listener.LogToConsole(); //needed for webjob logs (e.g. https://howlongtobeatsteam.scm.azurewebsites.net/azurejobs/#/jobs) listener.LogSessionErrors(); // log errors so they can be sent at the end of the run } EventSourceRegistrar.RegisterEventListener(this, listener); }