Tue Jan 25 15:52:19 unknown App Name[1018] <Error>: *** process 1018 exceeded 500 log message per second limit - remaining messages this second discarded ***Using custom log macros instead of standard NSLog(). That allows developers to leave logging calls as-in in the code, even for release version. Great! These are originally from Stack Overflow thread "NSLog tips and tricks":
#ifdef DEBUGNeed to start paying more attention to logging. The error mentioned above came from a customer using ad hoc debug release version, having strange problems. The problems were there even without logging, but wondering now if this too much logging will cause other problems, which wouldn't happen in normal version?
# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...)
#endif
// ALog always displays output regardless of the DEBUG setting
#define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
Isn't debugging fun, expecially remotely on different timezones, with nice mixture of cultural and language differencies? Really, it is fun :)
Yes, one of the worst things that can happen is when your debugging/logging code has side-effects. Unfortunately, this happens quite often ... :-}
ReplyDelete