From 7d9a9baa1322167d0f461897ad8c2c8ba1be1983 Mon Sep 17 00:00:00 2001 From: rvazarkar Date: Tue, 23 Jul 2024 17:51:54 -0400 Subject: [PATCH] chore: drop log verbosity for reg key opening --- src/CommonLib/Helpers.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CommonLib/Helpers.cs b/src/CommonLib/Helpers.cs index f3400cdb..63d4c466 100644 --- a/src/CommonLib/Helpers.cs +++ b/src/CommonLib/Helpers.cs @@ -264,19 +264,19 @@ public static RegistryResult GetRegistryKeyData(string target, string subkey, st data.Collected = true; } catch (IOException e) { - log.LogError(e, "Error getting data from registry for {Target}: {RegSubKey}:{RegValue}", + log.LogDebug(e, "Error getting data from registry for {Target}: {RegSubKey}:{RegValue}", target, subkey, subvalue); data.FailureReason = "Target machine was not found or not connectable"; } catch (SecurityException e) { - log.LogError(e, "Error getting data from registry for {Target}: {RegSubKey}:{RegValue}", + log.LogDebug(e, "Error getting data from registry for {Target}: {RegSubKey}:{RegValue}", target, subkey, subvalue); data.FailureReason = "User does not have the proper permissions to perform this operation"; } catch (UnauthorizedAccessException e) { - log.LogError(e, "Error getting data from registry for {Target}: {RegSubKey}:{RegValue}", + log.LogDebug(e, "Error getting data from registry for {Target}: {RegSubKey}:{RegValue}", target, subkey, subvalue); data.FailureReason = "User does not have the necessary registry rights"; } catch (Exception e) { - log.LogError(e, "Error getting data from registry for {Target}: {RegSubKey}:{RegValue}", + log.LogDebug(e, "Error getting data from registry for {Target}: {RegSubKey}:{RegValue}", target, subkey, subvalue); data.FailureReason = e.Message; }