Last pass of updating log messages in the solution
This commit is contained in:
@@ -572,7 +572,7 @@ namespace Umbraco.Core.Composing
|
||||
if (NotifiedLoadExceptionAssemblies.Contains(a.FullName) == false)
|
||||
{
|
||||
NotifiedLoadExceptionAssemblies.Add(a.FullName);
|
||||
Current.Logger.Warn(typeof (TypeFinder), ex, $"Could not load all types from {a.GetName().Name}.");
|
||||
Current.Logger.Warn(typeof (TypeFinder), ex, "Could not load all types from {TypeName}.", a.GetName().Name);
|
||||
}
|
||||
}
|
||||
return rex.Types.WhereNotNull().ToArray();
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Umbraco.Core.Migrations
|
||||
|
||||
if (string.IsNullOrWhiteSpace(sql))
|
||||
{
|
||||
Logger.Info(GetType(), $"SQL [{Context.Index}]: <empty>");
|
||||
Logger.Info(GetType(), "SQL [{ContextIndex}: <empty>", Context.Index);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -90,7 +90,7 @@ namespace Umbraco.Core.Migrations
|
||||
private void ExecuteStatement(StringBuilder stmtBuilder)
|
||||
{
|
||||
var stmt = stmtBuilder.ToString();
|
||||
Logger.Info(GetType(), $"SQL [{Context.Index}]: {stmt}");
|
||||
Logger.Info(GetType(), "SQL [{ContextIndex}]: {Sql}", Context.Index, stmt);
|
||||
Database.Execute(stmt);
|
||||
stmtBuilder.Clear();
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Umbraco.Core.Models
|
||||
|
||||
if (entity.ValidatePath() == false)
|
||||
{
|
||||
logger.Warn(typeof(PathValidationExtensions), $"The content item {entity.Id} has an invalid path: {entity.Path} with parentID: {entity.ParentId}");
|
||||
logger.Warn(typeof(PathValidationExtensions), "The content item {EntityId} has an invalid path: {EntityPath} with parentID: {EntityParentId}", entity.Id, entity.Path, entity.ParentId);
|
||||
if (entity.ParentId == -1)
|
||||
{
|
||||
entity.Path = string.Concat("-1,", entity.Id);
|
||||
@@ -112,4 +112,4 @@ namespace Umbraco.Core.Models
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ namespace Umbraco.Core.Models
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Current.Logger.Warn(typeof(PropertyTagsExtensions), ex, "Could not automatically convert stored json value to an enumerable string");
|
||||
Current.Logger.Warn(typeof(PropertyTagsExtensions), ex, "Could not automatically convert stored json value to an enumerable string '{Json}'", value.ToString());
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace Umbraco.Core
|
||||
var change = url != null && !_applicationUrls.Contains(url);
|
||||
if (change)
|
||||
{
|
||||
_logger.Info(typeof(ApplicationUrlHelper), $"New url \"{url}\" detected, re-discovering application url.");
|
||||
_logger.Info(typeof(ApplicationUrlHelper), "New url '{Url}' detected, re-discovering application url.", url);
|
||||
_applicationUrls.Add(url);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,14 +39,14 @@ namespace Umbraco.Core.Sync
|
||||
if (string.IsNullOrWhiteSpace(umbracoApplicationUrl) == false)
|
||||
{
|
||||
umbracoApplicationUrl = umbracoApplicationUrl.TrimEnd('/');
|
||||
logger.Info(TypeOfApplicationUrlHelper, "ApplicationUrl: " + umbracoApplicationUrl + " (provider)");
|
||||
logger.Info(TypeOfApplicationUrlHelper, "ApplicationUrl: {UmbracoAppUrl} (provider)", umbracoApplicationUrl);
|
||||
return umbracoApplicationUrl;
|
||||
}
|
||||
|
||||
if (request == null) return null;
|
||||
|
||||
umbracoApplicationUrl = GetApplicationUrlFromCurrentRequest(request, globalSettings);
|
||||
logger.Info(TypeOfApplicationUrlHelper, "ApplicationUrl: " + umbracoApplicationUrl + " (UmbracoModule request)");
|
||||
logger.Info(TypeOfApplicationUrlHelper, "ApplicationUrl: {UmbracoAppUrl} (UmbracoModule request)", umbracoApplicationUrl);
|
||||
return umbracoApplicationUrl;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace Umbraco.Core.Sync
|
||||
if (url.IsNullOrWhiteSpace() == false)
|
||||
{
|
||||
var umbracoApplicationUrl = url.TrimEnd('/');
|
||||
logger.Info(TypeOfApplicationUrlHelper, "ApplicationUrl: " + umbracoApplicationUrl + " (using web.routing/@umbracoApplicationUrl)");
|
||||
logger.Info(TypeOfApplicationUrlHelper, "ApplicationUrl: {UmbracoAppUrl} (using web.routing/@umbracoApplicationUrl)", umbracoApplicationUrl);
|
||||
return umbracoApplicationUrl;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Umbraco.Core.Sync
|
||||
var ssl = globalSettings.UseHttps ? "s" : "";
|
||||
url = "http" + ssl + "://" + url;
|
||||
var umbracoApplicationUrl = url.TrimEnd('/');
|
||||
logger.Info(TypeOfApplicationUrlHelper, "ApplicationUrl: " + umbracoApplicationUrl + " (using scheduledTasks/@baseUrl)");
|
||||
logger.Info(TypeOfApplicationUrlHelper, "ApplicationUrl: {UmbracoAppUrl} (using scheduledTasks/@baseUrl)", umbracoApplicationUrl);
|
||||
return umbracoApplicationUrl;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Umbraco.Core.Sync
|
||||
if (url.IsNullOrWhiteSpace() == false)
|
||||
{
|
||||
var umbracoApplicationUrl = url.TrimEnd('/');
|
||||
logger.Info(TypeOfApplicationUrlHelper, "ApplicationUrl: " + umbracoApplicationUrl + " (IServerRegistrar)");
|
||||
logger.Info(TypeOfApplicationUrlHelper, "ApplicationUrl: {UmbracoAppUrl} (IServerRegistrar)", umbracoApplicationUrl);
|
||||
return umbracoApplicationUrl;
|
||||
}
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ namespace Umbraco.Examine
|
||||
var filtered = c.RawQuery(rawQuery);
|
||||
var results = searcher.Search(filtered);
|
||||
|
||||
ProfilingLogger.Logger.Debug(GetType(), $"DeleteFromIndex with query: {rawQuery} (found {results.TotalItemCount} results)");
|
||||
ProfilingLogger.Logger.Debug(GetType(), "DeleteFromIndex with query: {Query} (found {TotalItems} results)", rawQuery, results.TotalItemCount);
|
||||
|
||||
//need to queue a delete item for each one found
|
||||
foreach (var r in results)
|
||||
|
||||
@@ -487,7 +487,7 @@ namespace Umbraco.Web.Editors
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Current.Logger.Error(typeof(ContentTypeController), "Error cleaning up temporary udt file in App_Data: " + ex.Message, ex);
|
||||
Current.Logger.Error<ContentTypeController>("Error cleaning up temporary udt file in App_Data: {File}", ex, filePath);
|
||||
}
|
||||
|
||||
return Request.CreateResponse(HttpStatusCode.OK);
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Umbraco.Web.Editors
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Logger.Error(GetType(), "Error creating dictionary", exception);
|
||||
Logger.Error(GetType(), "Error creating dictionary with {Name} under {ParentId}", exception, key, parentId);
|
||||
return Request.CreateNotificationValidationErrorResponse("Error creating dictionary item");
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,7 @@ namespace Umbraco.Web.Editors
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Error(GetType(), "Error saving dictionary", e);
|
||||
Logger.Error(GetType(), "Error saving dictionary with {Name} under {ParentId}", e, dictionary.Name, dictionary.ParentId);
|
||||
throw new HttpResponseException(Request.CreateNotificationValidationErrorResponse("Something went wrong saving dictionary"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,11 +42,11 @@ namespace Umbraco.Web.HealthCheck.Checks.DataIntegrity
|
||||
{
|
||||
var results = _databaseBuilder.ValidateDatabaseSchema();
|
||||
|
||||
_logger.Warn(typeof(DatabaseSchemaValidationHealthCheck), _textService.Localize("databaseSchemaValidationCheckDatabaseLogMessage"));
|
||||
_logger.Warn<DatabaseSchemaValidationHealthCheck>(_textService.Localize("databaseSchemaValidationCheckDatabaseLogMessage"));
|
||||
|
||||
foreach(var error in results.Errors)
|
||||
{
|
||||
_logger.Warn(typeof(DatabaseSchemaValidationHealthCheck), error.Item1 + ": " + error.Item2);
|
||||
_logger.Warn<DatabaseSchemaValidationHealthCheck>("{Error} : {ErrorDetail}", error.Item1, error.Item2);
|
||||
}
|
||||
|
||||
if(results.Errors.Count > 0)
|
||||
|
||||
@@ -447,7 +447,7 @@ namespace Umbraco.Web
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Current.Logger.Error(typeof(ImageCropperTemplateExtensions), "Could not parse the json string: " + json, ex);
|
||||
Current.Logger.Error(typeof(ImageCropperTemplateExtensions), "Could not parse the json string: {Json}", ex, json);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace Umbraco.Web
|
||||
user = userService.GetUserById(Constants.Security.SuperUserId);
|
||||
if (user == null)
|
||||
{
|
||||
Current.Logger.Warn(typeof(NotificationServiceExtensions), $"Noticiations can not be sent, no admin user with id {Constants.Security.SuperUserId} could be resolved");
|
||||
Current.Logger.Warn(typeof(NotificationServiceExtensions), "Noticiations can not be sent, no admin user with id {SuperUserId} could be resolved", Constants.Security.SuperUserId);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ namespace Umbraco.Web
|
||||
user = userService.GetUserById(Constants.Security.SuperUserId);
|
||||
if (user == null)
|
||||
{
|
||||
Current.Logger.Warn(typeof(NotificationServiceExtensions), $"Noticiations can not be sent, no admin user with id {Constants.Security.SuperUserId} could be resolved");
|
||||
Current.Logger.Warn(typeof(NotificationServiceExtensions), "Noticiations can not be sent, no admin user with id {SuperUserId} could be resolved", Constants.Security.SuperUserId);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Umbraco.Web
|
||||
{
|
||||
_suspended = false;
|
||||
|
||||
Current.ProfilingLogger.Logger.Info(typeof (PageCacheRefresher), $"Resume document cache (reload:{(_tried ? "true" : "false")}).");
|
||||
Current.ProfilingLogger.Logger.Info(typeof (PageCacheRefresher), "Resume document cache (reload:{Tried}).", _tried);
|
||||
|
||||
if (_tried == false) return;
|
||||
_tried = false;
|
||||
@@ -73,7 +73,7 @@ namespace Umbraco.Web
|
||||
{
|
||||
_suspended = false;
|
||||
|
||||
Current.ProfilingLogger.Logger.Info(typeof (ExamineEvents), $"Resume indexers (rebuild:{(_tried ? "true" : "false")}).");
|
||||
Current.ProfilingLogger.Logger.Info(typeof (ExamineEvents), "Resume indexers (rebuild:{Tried}).", _tried);
|
||||
|
||||
if (_tried == false) return;
|
||||
_tried = false;
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace Umbraco.Web.Templates
|
||||
{
|
||||
// find all relative urls (ie. urls that contain ~)
|
||||
var tags = ResolveUrlPattern.Matches(text);
|
||||
Current.Logger.Debug(typeof(IOHelper), "After regex: " + timer.Stopwatch.ElapsedMilliseconds + " matched: " + tags.Count);
|
||||
Current.Logger.Debug(typeof(IOHelper), "After regex: {ElapsedMilliseconds} matched: {TagsCount}", timer.Stopwatch.ElapsedMilliseconds, tags.Count);
|
||||
foreach (Match tag in tags)
|
||||
{
|
||||
var url = "";
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Umbraco.Web.Trees
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Current.Logger.Error(typeof(LegacyTreeJavascript), "Could not load the JS from the legacy tree " + bTree.TreeAlias, ex);
|
||||
Current.Logger.Error(typeof(LegacyTreeJavascript), "Could not load the JS from the legacy tree {TreeAlias}", ex, bTree.TreeAlias);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user