Add missing logging

This commit is contained in:
Robert Marshall 2020-04-10 13:05:44 +01:00
parent a85c12f91c
commit 2c7ccae412

View file

@ -56,6 +56,7 @@ namespace Robware.Api.Blog.Controllers {
[HttpGet(nameof(GetLatestPost))]
public async Task<ActionResult<BlogPost>> GetLatestPost() {
_logger.Log(LogLevel.Information, $"{nameof(GetLatestPost)}");
try {
return await _blogRepository.GetLatestPostAsync();
}
@ -67,6 +68,7 @@ namespace Robware.Api.Blog.Controllers {
[HttpGet(nameof(GetCount))]
public async Task<ActionResult<int>> GetCount() {
_logger.Log(LogLevel.Information, $"{nameof(GetCount)}");
try {
return await _blogRepository.GetCountAsync();
}