Change Warn to LogWarning

This commit is contained in:
Nikolaj
2020-09-14 10:17:32 +02:00
parent d7e3bce741
commit a1ecc4a5c9
79 changed files with 152 additions and 152 deletions

View File

@@ -156,7 +156,7 @@ namespace Umbraco.Web.PropertyEditors
{
// deal with weird situations by ignoring them (no comment)
row.PropertyValues.Remove(prop.Key);
_logger.Warn<BlockEditorPropertyValueEditor>(
_logger.LogWarning<BlockEditorPropertyValueEditor>(
"ToEditor removed property value {PropertyKey} in row {RowId} for property type {PropertyTypeAlias}",
prop.Key, row.Key, property.PropertyType.Alias);
continue;
@@ -405,7 +405,7 @@ namespace Umbraco.Web.PropertyEditors
if (!propertyTypes.TryGetValue(prop.Key, out var propType))
{
block.RawPropertyValues.Remove(prop.Key);
_logger.Warn<BlockEditorValues>("The property {PropertyKey} for block {BlockKey} was removed because the property type {PropertyTypeAlias} was not found on {ContentTypeAlias}",
_logger.LogWarning<BlockEditorValues>("The property {PropertyKey} for block {BlockKey} was removed because the property type {PropertyTypeAlias} was not found on {ContentTypeAlias}",
prop.Key, block.Key, prop.Key, contentType.Alias);
}
else

View File

@@ -217,7 +217,7 @@ namespace Umbraco.Core.PropertyEditors
var result = TryConvertValueToCrlType(editorValue.Value);
if (result.Success == false)
{
Current.Logger.Warn<DataValueEditor>("The value {EditorValue} cannot be converted to the type {StorageTypeValue}", editorValue.Value, ValueTypes.ToStorageType(ValueType));
Current.Logger.LogWarning<DataValueEditor>("The value {EditorValue} cannot be converted to the type {StorageTypeValue}", editorValue.Value, ValueTypes.ToStorageType(ValueType));
return null;
}
return result.Result;

View File

@@ -82,7 +82,7 @@ namespace Umbraco.Web.PropertyEditors
catch (Exception ex)
{
// for some reason the value is invalid so continue as if there was no value there
_logger.Warn<ImageCropperPropertyValueEditor>(ex, "Could not parse current db value to a JObject.");
_logger.LogWarning<ImageCropperPropertyValueEditor>(ex, "Could not parse current db value to a JObject.");
}
if (string.IsNullOrWhiteSpace(currentPath) == false)
currentPath = _mediaFileSystem.GetRelativePath(currentPath);

View File

@@ -143,7 +143,7 @@ namespace Umbraco.Web.PropertyEditors
{
// deal with weird situations by ignoring them (no comment)
row.RawPropertyValues.Remove(prop.Key);
_logger.Warn<NestedContentPropertyValueEditor>(
_logger.LogWarning<NestedContentPropertyValueEditor>(
ex,
"ConvertDbToString removed property value {PropertyKey} in row {RowId} for property type {PropertyTypeAlias}",
prop.Key, row.Id, propertyType.Alias);
@@ -212,7 +212,7 @@ namespace Umbraco.Web.PropertyEditors
{
// deal with weird situations by ignoring them (no comment)
row.RawPropertyValues.Remove(prop.Key);
_logger.Warn<NestedContentPropertyValueEditor>(
_logger.LogWarning<NestedContentPropertyValueEditor>(
ex,
"ToEditor removed property value {PropertyKey} in row {RowId} for property type {PropertyTypeAlias}",
prop.Key, row.Id, property.PropertyType.Alias);