Skip to content

Commit

Permalink
Only run a debug report if RunDebug is true *and* you are in debug mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Jump committed May 11, 2020
1 parent 4565b70 commit 1162da0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion uSync8.BackOffice/Services/uSyncService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;

using Umbraco.Core.Composing;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;

using uSync8.BackOffice.Configuration;
Expand Down Expand Up @@ -102,8 +103,9 @@ public IEnumerable<uSyncAction> Report(string folder, IEnumerable<ExtendedHandle

var summary = new SyncProgressSummary(handlers.Select(x => x.Handler), "Reporting", handlers.Count());

if (settings.ReportDebug)
if (GlobalSettings.DebugMode && settings.ReportDebug)
{
logger.Warn<uSyncService>("Running Report Debug - this can be a slow process, don't enable unless you need it");
// debug - full export into a dated folder.
summary.Message = "Debug: Creating Extract in Tracker folder";
callbacks?.Callback?.Invoke(summary);
Expand Down

0 comments on commit 1162da0

Please sign in to comment.