From 58f9ff4b798d33fed467e73bb61b2d279cd67b38 Mon Sep 17 00:00:00 2001 From: Marc Goodson Date: Tue, 11 Apr 2017 20:37:59 +0100 Subject: [PATCH] Add some debug logging when there is a distributed calls configuration issue --- src/Umbraco.Core/Sync/ConfigServerRegistrar.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Sync/ConfigServerRegistrar.cs b/src/Umbraco.Core/Sync/ConfigServerRegistrar.cs index 8245491d97..841a229a33 100644 --- a/src/Umbraco.Core/Sync/ConfigServerRegistrar.cs +++ b/src/Umbraco.Core/Sync/ConfigServerRegistrar.cs @@ -4,6 +4,7 @@ using System.Web; using Umbraco.Core.Configuration; using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.IO; +using Umbraco.Core.Logging; namespace Umbraco.Core.Sync { @@ -40,8 +41,9 @@ namespace Umbraco.Core.Sync .ToList(); if (serversA.Length == 0) - { + { _serverRole = ServerRole.Unknown; // config error, actually + LogHelper.Debug(string.Format("Server Role Unknown: DistributedCalls are enabled but no servers are listed")); } else { @@ -50,7 +52,10 @@ namespace Umbraco.Core.Sync var serverName = master.ServerName; if (appId.IsNullOrWhiteSpace() && serverName.IsNullOrWhiteSpace()) + { _serverRole = ServerRole.Unknown; // config error, actually + LogHelper.Debug(string.Format("Server Role Unknown: Server Name or AppId missing from Server configuration in DistributedCalls settings")); + } else _serverRole = IsCurrentServer(appId, serverName) ? ServerRole.Master