Skip to content

Commit

Permalink
chore: drop log verbosity for reg key opening
Browse files Browse the repository at this point in the history
  • Loading branch information
rvazarkar committed Jul 23, 2024
1 parent 4b7c739 commit 7d9a9ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/CommonLib/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7d9a9ba

Please sign in to comment.