Skip to content

Commit 2fc315f

Browse files
authored
optin error record config (#416)
1 parent cf91f5b commit 2fc315f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Authentication.Abstractions/Models/ConfigKeysForCommon.cs

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ public static class ConfigKeysForCommon
2929
public const string EnableDataCollection = "EnableDataCollection";
3030
public const string EnableTestCoverage = "EnableTestCoverage";
3131
public const string CheckForUpgrade = "CheckForUpgrade";
32-
//Use DisableErrorRecordsPersistence as opt-out for now, will replace it with EnableErrorRecordsPersistence as opt-in at next major release (November 2023)
33-
public const string DisableErrorRecordsPersistence = "DisableErrorRecordsPersistence";
3432
public const string EnableErrorRecordsPersistence = "EnableErrorRecordsPersistence";
3533
public const string DisplaySecretsWarning = "DisplaySecretsWarning";
3634
}

src/Common/AzurePSCmdlet.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -823,8 +823,8 @@ private void RecordDebugMessages()
823823
//Use DisableErrorRecordsPersistence as opt-out for now, will replace it with EnableErrorRecordsPersistence as opt-in at next major release (November 2023)
824824
private bool ShouldRecordDebugMessages()
825825
{
826-
return (!AzureSession.Instance.TryGetComponent<IConfigManager>(nameof(IConfigManager), out var configManager)
827-
|| !configManager.GetConfigValue<bool>(ConfigKeysForCommon.DisableErrorRecordsPersistence))
826+
return AzureSession.Instance.TryGetComponent<IConfigManager>(nameof(IConfigManager), out var configManager)
827+
&& configManager.GetConfigValue<bool>(ConfigKeysForCommon.EnableErrorRecordsPersistence)
828828
&& IsDataCollectionAllowed();
829829
}
830830

0 commit comments

Comments
 (0)