From 677e9869cb3753ee6f7f4748f4fcbd0e720670ef Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 28 May 2016 14:13:39 -0400 Subject: [PATCH] data: Added ::getAllExclusions debug output --- src/data.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/data.cpp b/src/data.cpp index 82aa50a5..4421cdd1 100644 --- a/src/data.cpp +++ b/src/data.cpp @@ -256,9 +256,10 @@ std::vector getAllExclusions ( std::vector exclusions; for (auto& name : rules.all ("exclusions.")) exclusions.push_back (Exclusion (lowerCase (name), rules.get (name))); + debug (format ("Found {1} exclusions", exclusions.size ())); // Find exclusions 'exc day on ' and remove from holidays. - // Find exlcusions 'exc day off ' and add to holidays. + // Find exclusions 'exc day off ' and add to holidays. std::vector daysOn; std::vector daysOff; for (auto& exclusion : exclusions) @@ -276,6 +277,10 @@ std::vector getAllExclusions ( // daysOff are combined with existing holidays. results = addRanges (range, results, daysOff); + if (daysOn.size ()) + debug (format ("Found {1} additional working days", daysOn.size ())); + if (daysOff.size ()) + debug (format ("Found {1} additional non-working days", daysOff.size ())); // daysOn are subtracted from the existing holidays. results = subtractRanges (results, daysOn);