I implemented debug logging in my application defining a DLog function using the following code in .pch file:
#ifdef DEBUG
# define DLog(fmt, ...) NSLog((@"DEBUG - %s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...)
#endif
My understanding is that when I'll release my application on the store, the debug messages printed with DLog will not be logged on the device.
Is it possible to disable debug messages printed by my DLog function wheh I run the application on my device from XCode?
Thanks.
#if !defined(DEBUG) || !(TARGET_IPHONE_SIMULATOR)
#define DLog(...)
#endif
Hope this helps you...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.