Skip to content

Instantly share code, notes, and snippets.

@doskoi
Created January 23, 2014 11:42
Show Gist options
  • Save doskoi/8577224 to your computer and use it in GitHub Desktop.
Save doskoi/8577224 to your computer and use it in GitHub Desktop.
A better version of NSLog
#define NSLog(format, ...) do { \
fprintf(stderr, "<%s : %d> %s\n", \
[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], \
__LINE__, __func__); \
(NSLog)((format), ##__VA_ARGS__); \
fprintf(stderr, "-------\n"); \
} while (0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment