Fix some exceptions being logged the wrong way (#9693)

In these statements, the exception was passed as a log message parameter instead of as the exception. This meant the exception and including stack trace was not logged and thus lost.
This commit is contained in:
rbottema
2021-02-21 11:03:28 +01:00
committed by GitHub
parent 75ee3b9622
commit e554ef0445
4 changed files with 6 additions and 6 deletions

View File

@@ -328,7 +328,7 @@ namespace Umbraco.Web
}
catch (Exception ex)
{
_logger.Error<UmbracoModule>("Could not dispose item with key " + k, ex);
_logger.Error<UmbracoModule>(ex, "Could not dispose item with key {Key}", k);
}
try
{
@@ -336,7 +336,7 @@ namespace Umbraco.Web
}
catch (Exception ex)
{
_logger.Error<UmbracoModule>("Could not dispose item key " + k, ex);
_logger.Error<UmbracoModule>(ex, "Could not dispose item key {Key}", k);
}
}
}