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

@@ -521,7 +521,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
parent = GetParentLink(kit.Node, null);
if (parent == null)
{
_logger.Warn<ContentStore>($"Skip item id={kit.Node.Id}, could not find parent id={kit.Node.ParentContentId}.");
_logger.LogWarning<ContentStore>($"Skip item id={kit.Node.Id}, could not find parent id={kit.Node.ParentContentId}.");
return false;
}
@@ -530,21 +530,21 @@ namespace Umbraco.Web.PublishedCache.NuCache
// because the data sort operation is by path.
if (parent.Value == null)
{
_logger.Warn<ContentStore>($"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.");
_logger.LogWarning<ContentStore>($"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.");
return false;
}
// make sure the kit is valid
if (kit.DraftData == null && kit.PublishedData == null)
{
_logger.Warn<ContentStore>($"Skip item id={kit.Node.Id}, both draft and published data are null.");
_logger.LogWarning<ContentStore>($"Skip item id={kit.Node.Id}, both draft and published data are null.");
return false;
}
// unknown = bad
if (_contentTypesById.TryGetValue(kit.ContentTypeId, out var link) == false || link.Value == null)
{
_logger.Warn<ContentStore>($"Skip item id={kit.Node.Id}, could not find content type id={kit.ContentTypeId}.");
_logger.LogWarning<ContentStore>($"Skip item id={kit.Node.Id}, could not find content type id={kit.ContentTypeId}.");
return false;
}

View File

@@ -215,7 +215,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
{
if (Debugger.IsAttached)
throw new InvalidOperationException("Missing cmsContentNu edited content for node " + dto.Id + ", consider rebuilding.");
_logger.Warn<DatabaseDataSource>("Missing cmsContentNu edited content for node {NodeId}, consider rebuilding.", dto.Id);
_logger.LogWarning<DatabaseDataSource>("Missing cmsContentNu edited content for node {NodeId}, consider rebuilding.", dto.Id);
}
else
{
@@ -242,7 +242,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
{
if (Debugger.IsAttached)
throw new InvalidOperationException("Missing cmsContentNu published content for node " + dto.Id + ", consider rebuilding.");
_logger.Warn<DatabaseDataSource>("Missing cmsContentNu published content for node {NodeId}, consider rebuilding.", dto.Id);
_logger.LogWarning<DatabaseDataSource>("Missing cmsContentNu published content for node {NodeId}, consider rebuilding.", dto.Id);
}
else
{

View File

@@ -243,14 +243,14 @@ namespace Umbraco.Web.PublishedCache.NuCache
{
okContent = LockAndLoadContent(scope => LoadContentFromLocalDbLocked(true));
if (!okContent)
_logger.Warn<PublishedSnapshotService>("Loading content from local db raised warnings, will reload from database.");
_logger.LogWarning<PublishedSnapshotService>("Loading content from local db raised warnings, will reload from database.");
}
if (_localMediaDbExists)
{
okMedia = LockAndLoadMedia(scope => LoadMediaFromLocalDbLocked(true));
if (!okMedia)
_logger.Warn<PublishedSnapshotService>("Loading media from local db raised warnings, will reload from database.");
_logger.LogWarning<PublishedSnapshotService>("Loading media from local db raised warnings, will reload from database.");
}
if (!okContent)