GDILog - Replacement for NSLog
// | |
// GDILog.h | |
// GDILog | |
// | |
// Created by Grant Davis on 8/18/14. | |
// Copyright (c) 2014 Grant Davis Interactive, LLC. All rights reserved. | |
// | |
#ifdef DEBUG | |
#include <string.h> | |
#define FILE (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) | |
#define GDILog(...) printf("%s (%d) -> %s\r", FILE, __LINE__, [[NSString stringWithFormat:__VA_ARGS__] UTF8String]) | |
#else | |
#define GDILog(...) | |
#endif |
This comment has been minimized.
This comment has been minimized.
Example:
Prints: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
GDILog is an alternative to NSLog that provides a few nice things: