Skip to content

Commit e5549b7

Browse files
OzoneNZnathanwoulfe
authored andcommitted
Fix logger message placeholders being parsed literally instead of substituted
1 parent e8a6a92 commit e5549b7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Umbraco.PublishedCache.NuCache/ContentStore.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ private bool BuildKit(ContentNodeKit kit, out LinkedNode<ContentNode> parent)
524524
parent = GetParentLink(kit.Node, null);
525525
if (parent == null)
526526
{
527-
_logger.LogWarning("Skip item id={kit.Node.Id}, could not find parent id={kit.Node.ParentContentId}.", kit.Node.Id, kit.Node.ParentContentId);
527+
_logger.LogWarning("Skip item id={kitNodeId}, could not find parent id={kitNodeParentContentId}.", kit.Node.Id, kit.Node.ParentContentId);
528528
return false;
529529
}
530530

@@ -533,21 +533,21 @@ private bool BuildKit(ContentNodeKit kit, out LinkedNode<ContentNode> parent)
533533
// because the data sort operation is by path.
534534
if (parent.Value == null)
535535
{
536-
_logger.LogWarning("Skip item id={kit.Node.Id}, no Data assigned for linked node with path {kit.Node.Path} and parent id {kit.Node.ParentContentId}. This can indicate data corruption for the Path value for node {kit.Node.Id}. See the Health Check dashboard in Settings to resolve data integrity issues.", kit.Node.Id, kit.Node.ParentContentId);
536+
_logger.LogWarning("Skip item id={kitNodeId}, no Data assigned for linked node with path {kitNodePath} and parent id {kitNodeParentContentId}. This can indicate data corruption for the Path value for node {kitNodeId}. See the Health Check dashboard in Settings to resolve data integrity issues.", kit.Node.Id, kit.Node.Path, kit.Node.ParentContentId, kit.Node.Id);
537537
return false;
538538
}
539539

540540
// make sure the kit is valid
541541
if (kit.DraftData == null && kit.PublishedData == null)
542542
{
543-
_logger.LogWarning("Skip item id={kit.Node.Id}, both draft and published data are null.", kit.Node.Id);
543+
_logger.LogWarning("Skip item id={kitNodeId}, both draft and published data are null.", kit.Node.Id);
544544
return false;
545545
}
546546

547547
// unknown = bad
548548
if (_contentTypesById.TryGetValue(kit.ContentTypeId, out var link) == false || link.Value == null)
549549
{
550-
_logger.LogWarning("Skip item id={kit.Node.Id}, could not find content type id={kit.ContentTypeId}.", kit.Node.Id, kit.ContentTypeId);
550+
_logger.LogWarning("Skip item id={kitNodeId}, could not find content type id={kitContentTypeId}.", kit.Node.Id, kit.ContentTypeId);
551551
return false;
552552
}
553553

@@ -723,7 +723,7 @@ public bool SetAllFastSortedLocked(IEnumerable<ContentNodeKit> kits, bool fromDb
723723
previousNode = null; // there is no previous sibling
724724
}
725725

726-
_logger.LogDebug("Set {thisNode.Id} with parent {thisNode.ParentContentId}", thisNode.Id, thisNode.ParentContentId);
726+
_logger.LogDebug("Set {thisNodeId} with parent {thisNodeParentContentId}", thisNode.Id, thisNode.ParentContentId);
727727
SetValueLocked(_contentNodes, thisNode.Id, thisNode);
728728

729729
// if we are initializing from the database source ensure the local db is updated
@@ -780,7 +780,7 @@ public bool SetAllLocked(IEnumerable<ContentNodeKit> kits)
780780
ok = false;
781781
continue; // skip that one
782782
}
783-
_logger.LogDebug("Set {kit.Node.Id} with parent {kit.Node.ParentContentId}", kit.Node.Id, kit.Node.ParentContentId);
783+
_logger.LogDebug("Set {kitNodeId} with parent {kitNodeParentContentId}", kit.Node.Id, kit.Node.ParentContentId);
784784
SetValueLocked(_contentNodes, kit.Node.Id, kit.Node);
785785

786786
if (_localDb != null) RegisterChange(kit.Node.Id, kit);

0 commit comments

Comments
 (0)