Created
August 7, 2015 17:40
-
-
Save mwahlig/45b5846c778bcdae8728 to your computer and use it in GitHub Desktop.
Print name of calling function to debug log
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
NSArray *syms = [NSThread callStackSymbols]; | |
if ([syms count] > 1) { | |
NSLog(@"<%@ %p> %@ - caller: %@ ", [self class], self, NSStringFromSelector(_cmd),[syms objectAtIndex:1]); | |
} else { | |
NSLog(@"<%@ %p> %@", [self class], self, NSStringFromSelector(_cmd)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment