Skip to content

Commit

Permalink
logging fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Mar 3, 2025
1 parent b317465 commit ab0d7da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ function New-CIPPAuditLogSearchResultsCache {
}
} catch {
Write-Information "Error checking for failed downloads: $($_.Exception.Message)"
# Continue with the process even if the rerun protection check fails
}

try {
Expand Down Expand Up @@ -75,7 +74,7 @@ function New-CIPPAuditLogSearchResultsCache {
$FailedDownloadsTable = Get-CippTable -TableName 'FailedAuditLogDownloads'
$failedEntities = Get-CIPPAzDataTableEntity @FailedDownloadsTable -Filter "PartitionKey eq '$TenantFilter' and SearchId eq '$SearchId'"
if ($failedEntities) {
Remove-CIPPAzDataTableEntity @FailedDownloadsTable -Entity $entity
Remove-AzDataTableEntity @FailedDownloadsTable -Entity $entity
Write-Information "Removed failed download records for search ID: $SearchId, tenant: $TenantFilter"
}
} catch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function Test-CIPPAuditLogRules {
if ($LogCount -gt 0) {
$LocationTable = Get-CIPPTable -TableName 'knownlocationdb'
$ProcessedData = foreach ($AuditRecord in $SearchResults) {
Write-Host "Auditlogs: The record is $($AuditRecord.operation) - $($TenantFilter)"
#Write-Host "Auditlogs: The record is $($AuditRecord.operation) - $($TenantFilter)"
$RootProperties = $AuditRecord | Select-Object * -ExcludeProperty auditData
$Data = $AuditRecord.auditData | Select-Object *, CIPPAction, CIPPClause, CIPPGeoLocation, CIPPBadRepIP, CIPPHostedIP, CIPPIPDetected, CIPPLocationInfo, CIPPExtendedProperties, CIPPDeviceProperties, CIPPParameters, CIPPModifiedProperties, AuditRecord -ErrorAction SilentlyContinue
try {
Expand Down

0 comments on commit ab0d7da

Please sign in to comment.