Skip to content

Commit

Permalink
Merge pull request #17 from marcduiker/develop
Browse files Browse the repository at this point in the history
Extra logging for publications
  • Loading branch information
marcduiker authored Mar 27, 2019
2 parents e907746 + db4cbb8 commit c2e7532
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public async Task<Publication> 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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public async Task<Publication> Run(
}
}
}

logger.LogInformation($"Found publication on web for {publicationConfiguration.PublicationSourceName}: " +
$"ID: {publication.Id}," +
$"Date: {publication.PublicationDate:F}.");

return publication;
}
Expand Down

0 comments on commit c2e7532

Please sign in to comment.