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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user