diff --git a/src/AzureFunctionsUpdates/Activities/Publications/GetLatestPublicationFromHistory.cs b/src/AzureFunctionsUpdates/Activities/Publications/GetLatestPublicationFromHistory.cs index 410d274..412f4f3 100644 --- a/src/AzureFunctionsUpdates/Activities/Publications/GetLatestPublicationFromHistory.cs +++ b/src/AzureFunctionsUpdates/Activities/Publications/GetLatestPublicationFromHistory.cs @@ -24,6 +24,13 @@ public async Task Run( var queryResult = await table.ExecuteQuerySegmentedAsync(query, null); latestKnownPublication = queryResult.Results.AsReadOnly().OrderByDescending(publication => publication.PublicationDate).FirstOrDefault(); + if (latestKnownPublication != null) + { + logger.LogInformation($"Found publication in history for configuration: {publicationConfiguration.PublicationSourceName}, " + + $"ID: {latestKnownPublication.Id}," + + $"PublicationDate: {latestKnownPublication.PublicationDate:F}."); + } + return latestKnownPublication ?? new NullPublication(publicationConfiguration.PublicationSourceName); } } diff --git a/src/AzureFunctionsUpdates/Activities/Publications/GetLatestPublicationFromWeb.cs b/src/AzureFunctionsUpdates/Activities/Publications/GetLatestPublicationFromWeb.cs index 9f8f815..cee96ad 100644 --- a/src/AzureFunctionsUpdates/Activities/Publications/GetLatestPublicationFromWeb.cs +++ b/src/AzureFunctionsUpdates/Activities/Publications/GetLatestPublicationFromWeb.cs @@ -35,6 +35,10 @@ public async Task Run( } } } + + logger.LogInformation($"Found publication on web for {publicationConfiguration.PublicationSourceName}: " + + $"ID: {publication.Id}," + + $"Date: {publication.PublicationDate:F}."); return publication; }