With debug, report each event having rules applied

This commit is contained in:
Richard Frith-Macdonald 2020-12-01 17:45:35 +00:00
parent 68b560b62b
commit 8626bd1823

View file

@ -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"];