From 8626bd18237b993c540b44feff8a78f148643700 Mon Sep 17 00:00:00 2001 From: Richard Frith-Macdonald Date: Tue, 1 Dec 2020 17:45:35 +0000 Subject: [PATCH] With debug, report each event having rules applied --- EcAlerter.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/EcAlerter.m b/EcAlerter.m index 0f9854a..bcd9e82 100644 --- a/EcAlerter.m +++ b/EcAlerter.m @@ -360,7 +360,7 @@ replaceFields(NSDictionary *fields, NSString *template) - (void) smtpClient: (GSMimeSMTPClient*)client mimeUnsent: (GSMimeDocument*)doc { failEmail++; - NSLog(@"Message dropped on SMTP client shutdown: %@", doc); + NSLog(@"Message dropped: %@", doc); } - (GSMimeSMTPClient*) _smtp @@ -862,6 +862,10 @@ replaceFields(NSDictionary *fields, NSString *template) NSUInteger dayOfWeek = 0; NSUInteger i; + if (YES == debug) + { + NSLog(@"Apply %u rules to %@", (unsigned)[rulesArray count], event); + } for (i = 0; i < [rulesArray count]; i++) { NSDictionary *times; @@ -1066,7 +1070,6 @@ replaceFields(NSDictionary *fields, NSString *template) [event->m setObject: match forKey: @"Match"]; } - found = YES; s = [NSString stringWithFormat: @"%u", (unsigned)i]; [event->m setObject: s forKey: @"Position"];