Skip to content

Commit

Permalink
Log actions
Browse files Browse the repository at this point in the history
  • Loading branch information
julienXX committed May 13, 2017
1 parent 94738f8 commit cb8f624
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Terminal Notifier/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification;
if (url && url.scheme && url.host) {
options[@"open"] = defaults[@"open"];
}else{
printf("%s", "Error: You need to pass a valid URI to -open.\n");
NSLog(@"'%@' is not a valid URI.", defaults[@"open"]);
exit(1);
}
}
Expand Down Expand Up @@ -452,19 +452,19 @@ - (BOOL)Quit:(NSDictionary *)udict notification:(NSUserNotification *)notificati
if ([notification.userInfo[@"output"] isEqualToString:@"outputEvent"]) {
if ([udict[@"activationType"] isEqualToString:@"closed"]) {
if ([udict[@"activationValue"] isEqualToString:@""]) {
printf("%s", "@CLOSED");
NSLog(@"@CLOSED");
}else{
printf("%s", [udict[@"activationValue"] UTF8String]);
NSLog(@"@%s", [udict[@"activationValue"] UTF8String]);
}
} else if ([udict[@"activationType"] isEqualToString:@"timeout"]) {
printf("%s", "@TIMEOUT");
NSLog(@"@TIMEOUT");
} else if ([udict[@"activationType"] isEqualToString:@"contentsClicked"]) {
printf("%s", "@CONTENTCLICKED");
NSLog(@"@CONTENTCLICKED");
} else{
if ([udict[@"activationValue"] isEqualToString:@""]) {
printf("%s", "@ACTIONCLICKED");
NSLog(@"@ACTIONCLICKED");
}else{
printf("%s", [udict[@"activationValue"] UTF8String]);
NSLog(@"@%s", [udict[@"activationValue"] UTF8String]);
}
}

Expand Down

0 comments on commit cb8f624

Please sign in to comment.