Skip to content

Instantly share code, notes, and snippets.

@atnan
Created May 3, 2010 04:10
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save atnan/387747 to your computer and use it in GitHub Desktop.
Save atnan/387747 to your computer and use it in GitHub Desktop.
# define ALog(format, ...) NSLog((@"%s [L%d] " format), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
# ifdef DEBUG
# define DLog(format, ...) ALog(format, ##__VA_ARGS__);
# else
# define DLog(...)
# endif
@favormm
Copy link

favormm commented Sep 26, 2013

NSString *test = @"test";
DLog(test);

This code are not work.

@mdziadkowiec
Copy link

You should use:
NSString *test = @"test";
DLog(@"test = %@", test);

First argument is format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment