1

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.

4

1 回答 1

2
#if !defined(DEBUG) || !(TARGET_IPHONE_SIMULATOR)
    #define DLog(...)
#endif

希望这可以帮助你...

于 2013-05-26T11:26:11.930 回答