public
Description: An objective-C implementation of ActiveRecord
Homepage: http://activerecord.lighthouseapp.com
Clone URL: git://github.com/aptiva/activerecord.git
Click here to lend your support to: activerecord and make a donation at www.pledgie.com !
activerecord / ActiveRecord_Prefix.pch
100644 25 lines (21 sloc) 1.524 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//
// Prefix header for all source files of the 'ActiveRecord' target in the 'ActiveRecord' project.
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
 
// Some debug stuff
// Crashesss
#define CrashHerePlease() { *(int *)0 = 123; }
#define ARLog(...) printf("%s(Active Record)[%u] %32.32s: %s\n", [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"] UTF8String], \
                                                                 getpid(),\
                                                                 [[NSString stringWithFormat:@"%s:%u", [[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__] UTF8String],\
                                                                 [[NSString stringWithFormat:__VA_ARGS__] UTF8String])
/*#define ARLog(...) printf("%s: %s\n", [[NSString stringWithFormat:@"%s:%u", [[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__] UTF8String],\
                                           [[NSString stringWithFormat:__VA_ARGS__] UTF8String])*/
 
#ifdef ENABLE_AR_DEBUG
// We make it a warning because when unit testing it's nice to see the logs in the list view instead of having to scroll through all the compiler output
#define ARDebugLog(...) printf("%s: warning: %s\n", [[NSString stringWithFormat:@"%s:%u", [[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__] UTF8String], [[NSString stringWithFormat:__VA_ARGS__] UTF8String])
#else
# define ARDebugLog(...)
#endif
 
#endif