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.

1 Answer 1

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

Hope this helps you...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.