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

@@ -115,7 +115,7 @@ namespace Umbraco.Web.PropertyEditors
}
catch (Exception ex)
{
_logger.Error<MultiUrlPickerValueEditor>("Error getting links", ex);
_logger.Error<MultiUrlPickerValueEditor>(ex, "Error getting links");
}
return base.ToEditor(property, dataTypeService, culture, segment);
@@ -151,7 +151,7 @@ namespace Umbraco.Web.PropertyEditors
}
catch (Exception ex)
{
_logger.Error<MultiUrlPickerValueEditor>("Error saving links", ex);
_logger.Error<MultiUrlPickerValueEditor>(ex, "Error saving links");
}
return base.FromEditor(editorValue, currentValue);

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);
}
}
}