Skip to content

Commit

Permalink
Merge pull request #799 from bcgov/yj
Browse files Browse the repository at this point in the history
chore: logging enhancement
  • Loading branch information
ychung-mot authored Nov 19, 2024
2 parents c33e6d9 + e902d1a commit 8ccb0f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/StrDss.Service/TakedownConfirmationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,21 @@ public async Task ProcessTakedownConfirmationUploadAsync(DssUploadDelivery uploa

var row = csvReader.GetRecord<UploadLine>(); //it has been parsed once, so no exception expected.

_logger.LogInformation($"Takedown Confirmation - Processing listing ({row.OrgCd} - {row.ListingId})");
_logger.LogDebug($"Takedown Confirmation - Processing listing ({row.OrgCd} - {row.ListingId})");

var org = await _orgRepo.GetOrganizationByOrgCdAsync(row.OrgCd);

var listing = await _listingRepo.GetMasterListingAsync(org.OrganizationId, row.ListingId);

if (listing == null)
{
_logger.LogInformation($"Takedown Confirmation - Skipping listing (not found) - ({row.OrgCd} - {row.ListingId})");
_logger.LogDebug($"Takedown Confirmation - Skipping listing (not found) - ({row.OrgCd} - {row.ListingId})");
return (row.OrgCd, row.ListingId);
}

if (listing.IsTakenDown == true)
{
_logger.LogInformation($"Takedown Confirmation - Skipping listing (already taken down) - ({row.OrgCd} - {row.ListingId})");
_logger.LogDebug($"Takedown Confirmation - Skipping listing (already taken down) - ({row.OrgCd} - {row.ListingId})");
}
else
{
Expand Down

0 comments on commit 8ccb0f4

Please sign in to comment.