Created
July 13, 2019 00:14
-
-
Save wooster/d20f95db03fb79a29d38cd0bb7499d66 to your computer and use it in GitHub Desktop.
Quick Objective-C Logging Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A logging function for Objective-C that doesn't output the extras NSLog() does. | |
void quicklog(NSString *string, ...) { | |
va_list args; | |
va_start(args, string); | |
NSString *contents = [[NSString alloc] initWithFormat:string arguments:args]; | |
va_end(args); | |
printf("%s\n", [contents UTF8String]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment