Skip to content

Commit e8d9e6d

Browse files
committed
Also support ServiceControl.Audit/IngestAuditMessages to avoid confusion with other "audit" settings to that have ServiceControl.Audit prefix
1 parent 0e39e56 commit e8d9e6d

File tree

1 file changed

+9
-1
lines changed
  • src/ServiceControl.Audit/Infrastructure/Settings

1 file changed

+9
-1
lines changed

src/ServiceControl.Audit/Infrastructure/Settings/Settings.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,15 @@ void LoadAuditQueueInformation()
6363
throw new Exception("ServiceBus/AuditQueue value is required to start the instance");
6464
}
6565

66-
IngestAuditMessages = SettingsReader.Read(new SettingsRootNamespace("ServiceControl"), "IngestAuditMessages", true);
66+
var serviceControlNamespace = new SettingsRootNamespace("ServiceControl");
67+
68+
if (!SettingsReader.TryRead(SettingsRootNamespace, "IngestAuditMessages", out bool ingestAuditMessages))
69+
{
70+
// Backwards compatibility
71+
ingestAuditMessages = SettingsReader.Read(serviceControlNamespace, "IngestAuditMessages", true);
72+
}
73+
74+
IngestAuditMessages = ingestAuditMessages;
6775

6876
if (IngestAuditMessages == false)
6977
{

0 commit comments

Comments
 (0)