Skip to content

Commit 99e981b

Browse files
committed
updating to use structured logging.
1 parent 1b97a54 commit 99e981b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Umbraco.Deploy.Contrib.Connectors/ValueConnectors/BlockEditorValueConnector.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public string ToArtifact(object value, PropertyType propertyType, ICollection<Ar
8787

8888
if (propType == null)
8989
{
90-
_logger.Debug<NestedContentValueConnector>($"No property type found with alias {key} on content type {contentType.Alias}");
90+
_logger.Debug<BlockEditorValueConnector>("No property type found with alias {Key} on content type {ContentTypeAlias}.", key, contentType.Alias);
9191
continue;
9292
}
9393

@@ -99,8 +99,7 @@ public string ToArtifact(object value, PropertyType propertyType, ICollection<Ar
9999
var val = block.PropertyValues[key];
100100
object parsedValue = propValueConnector.ToArtifact(val, propType, dependencies);
101101

102-
// getting Map image value umb://media/43e7401fb3cd48ceaa421df511ec703c to (nothing) - why?!
103-
_logger.Debug<BlockEditorValueConnector>("Map " + key + " value '" + block.PropertyValues[key] + "' to '" + parsedValue + "' using " + propValueConnector.GetType() + " for " + propType);
102+
_logger.Debug<BlockEditorValueConnector>("Map {Key} value '{PropertyValue}' to '{ParsedValue}' using {PropValueConnectorType} for {PropTypeAlias}.", key, block.PropertyValues[key], parsedValue, propValueConnector.GetType(), propType.Alias);
104103

105104
parsedValue = parsedValue?.ToString();
106105

@@ -152,7 +151,7 @@ public object FromArtifact(string value, PropertyType propertyType, object curre
152151

153152
if (innerPropertyType == null)
154153
{
155-
_logger.Debug<BlockEditorValueConnector>($"No property type found with alias {key} on content type {contentType.Alias}");
154+
_logger.Debug<BlockEditorValueConnector>("No property type found with alias {Key} on content type {ContentTypeAlias}.", key, contentType.Alias);
156155
continue;
157156
}
158157

0 commit comments

Comments
 (0)