You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only start flush logs timer when there's an event to write (#11100)
* Enable flush logs timer when there's an event to log
* Set errors to warning
* Disable service when there's any failure (even if transient) as part of flush logs, purge events or execute batch.
* Check for _hostId first so we avoid lookups.
* Adding release notes
Copy file name to clipboardExpand all lines: src/WebJobs.Script.WebHost/Diagnostics/DiagnosticEventTableStorageRepository.Log.cs
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -38,16 +38,16 @@ private static class Logger
38
38
LoggerMessage.Define<string>(LogLevel.Debug,newEventId(6,nameof(DeletingTableWithOutdatedEventVersion)),"Deleting table '{tableName}' as it contains records with an outdated EventVersion.");
LoggerMessage.Define(LogLevel.Error,newEventId(7,nameof(ErrorPurgingDiagnosticEventVersions)),"Error occurred when attempting to purge previous diagnostic event versions.");
41
+
LoggerMessage.Define(LogLevel.Warning,newEventId(7,nameof(ErrorPurgingDiagnosticEventVersions)),"Error occurred when attempting to purge previous diagnostic event versions.");
LoggerMessage.Define(LogLevel.Error,newEventId(9,nameof(UnableToGetTableReferenceOrCreateTable)),"Unable to get table reference or create table. Aborting write operation.");
47
+
LoggerMessage.Define(LogLevel.Warning,newEventId(9,nameof(UnableToGetTableReferenceOrCreateTable)),"Unable to get table reference or create table. Aborting write operation.");
LoggerMessage.Define(LogLevel.Debug,newEventId(11,nameof(PrimaryHostStateProviderNotAvailable)),"PrimaryHostStateProvider is not available. Skipping the check for primary host.");
// If we reach this point, we already checked for permissions on TableClient initialization.
198
+
// It is possible that the permissions changed after the initialization, any firewall/network rules were changed or it's a custom role where we don't have permissions to query entities.
mockDiagnosticEventTableStorageRepository.Object.WriteDiagnosticEvent(DateTime.UtcNow,"eh1",LogLevel.Information,"This is the message","https://fwlink/",newException("exception message"));
0 commit comments