Remove Debug<T> from LoggerExtensions
This commit is contained in:
@@ -51,7 +51,7 @@ namespace Umbraco.Web.Routing
|
||||
|
||||
if (nodeId > 0)
|
||||
{
|
||||
_logger.Debug<ContentFinderByIdPath>("Id={NodeId}", nodeId);
|
||||
_logger.LogDebug("Id={NodeId}", nodeId);
|
||||
node = frequest.UmbracoContext.Content.GetById(nodeId);
|
||||
|
||||
if (node != null)
|
||||
@@ -67,7 +67,7 @@ namespace Umbraco.Web.Routing
|
||||
}
|
||||
|
||||
frequest.PublishedContent = node;
|
||||
_logger.Debug<ContentFinderByIdPath>("Found node with id={PublishedContentId}", frequest.PublishedContent.Id);
|
||||
_logger.LogDebug("Found node with id={PublishedContentId}", frequest.PublishedContent.Id);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -77,7 +77,7 @@ namespace Umbraco.Web.Routing
|
||||
}
|
||||
|
||||
if (nodeId == -1)
|
||||
_logger.Debug<ContentFinderByIdPath>("Not a node id");
|
||||
_logger.LogDebug("Not a node id");
|
||||
|
||||
return node != null;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Umbraco.Web.Routing
|
||||
|
||||
if (redirectUrl == null)
|
||||
{
|
||||
_logger.Debug<ContentFinderByRedirectUrl>("No match for route: {Route}", route);
|
||||
_logger.LogDebug("No match for route: {Route}", route);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -49,14 +49,14 @@ namespace Umbraco.Web.Routing
|
||||
var url = content == null ? "#" : content.Url(_publishedUrlProvider, redirectUrl.Culture);
|
||||
if (url.StartsWith("#"))
|
||||
{
|
||||
_logger.Debug<ContentFinderByRedirectUrl>("Route {Route} matches content {ContentId} which has no url.", route, redirectUrl.ContentId);
|
||||
_logger.LogDebug("Route {Route} matches content {ContentId} which has no url.", route, redirectUrl.ContentId);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Appending any querystring from the incoming request to the redirect url.
|
||||
url = string.IsNullOrEmpty(frequest.Uri.Query) ? url : url + frequest.Uri.Query;
|
||||
|
||||
_logger.Debug<ContentFinderByRedirectUrl>("Route {Route} matches content {ContentId} with url '{Url}', redirecting.", route, content.Id, url);
|
||||
_logger.LogDebug("Route {Route} matches content {ContentId} with url '{Url}', redirecting.", route, content.Id, url);
|
||||
frequest.SetRedirectPermanent(url);
|
||||
|
||||
|
||||
|
||||
@@ -46,17 +46,17 @@ namespace Umbraco.Web.Routing
|
||||
{
|
||||
if (docreq == null) throw new System.ArgumentNullException(nameof(docreq));
|
||||
|
||||
Logger.Debug<ContentFinderByUrl>("Test route {Route}", route);
|
||||
Logger.LogDebug("Test route {Route}", route);
|
||||
|
||||
var node = docreq.UmbracoContext.Content.GetByRoute(docreq.UmbracoContext.InPreviewMode, route, culture: docreq.Culture?.Name);
|
||||
if (node != null)
|
||||
{
|
||||
docreq.PublishedContent = node;
|
||||
Logger.Debug<ContentFinderByUrl>("Got content, id={NodeId}", node.Id);
|
||||
Logger.LogDebug("Got content, id={NodeId}", node.Id);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Debug<ContentFinderByUrl>("No match.");
|
||||
Logger.LogDebug("No match.");
|
||||
}
|
||||
|
||||
return node;
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Umbraco.Web.Routing
|
||||
if (node != null)
|
||||
{
|
||||
frequest.PublishedContent = node;
|
||||
Logger.Debug<ContentFinderByUrlAlias>("Path '{UriAbsolutePath}' is an alias for id={PublishedContentId}", frequest.Uri.AbsolutePath, frequest.PublishedContent.Id);
|
||||
Logger.LogDebug("Path '{UriAbsolutePath}' is an alias for id={PublishedContentId}", frequest.Uri.AbsolutePath, frequest.PublishedContent.Id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Umbraco.Web.Routing
|
||||
// no template if "/"
|
||||
if (path == "/")
|
||||
{
|
||||
Logger.Debug<ContentFinderByUrlAndTemplate>("No template in path '/'");
|
||||
Logger.LogDebug("No template in path '/'");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -59,11 +59,11 @@ namespace Umbraco.Web.Routing
|
||||
|
||||
if (template == null)
|
||||
{
|
||||
Logger.Debug<ContentFinderByUrlAndTemplate>("Not a valid template: '{TemplateAlias}'", templateAlias);
|
||||
Logger.LogDebug("Not a valid template: '{TemplateAlias}'", templateAlias);
|
||||
return false;
|
||||
}
|
||||
|
||||
Logger.Debug<ContentFinderByUrlAndTemplate>("Valid template: '{TemplateAlias}'", templateAlias);
|
||||
Logger.LogDebug("Valid template: '{TemplateAlias}'", templateAlias);
|
||||
|
||||
// look for node corresponding to the rest of the route
|
||||
var route = frequest.HasDomain ? (frequest.Domain.ContentId + path) : path;
|
||||
@@ -71,7 +71,7 @@ namespace Umbraco.Web.Routing
|
||||
|
||||
if (node == null)
|
||||
{
|
||||
Logger.Debug<ContentFinderByUrlAndTemplate>("Not a valid route to node: '{Route}'", route);
|
||||
Logger.LogDebug("Not a valid route to node: '{Route}'", route);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Umbraco.Web.Routing
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(route))
|
||||
{
|
||||
_logger.Debug<DefaultUrlProvider>("Couldn't find any page with nodeId={NodeId}. This is most likely caused by the page not being published.", id);
|
||||
_logger.LogDebug("Couldn't find any page with nodeId={NodeId}. This is most likely caused by the page not being published.", id);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user