On Wed, Jul 23, 2008 at 7:48 AM, Mike <[EMAIL PROTECTED]> wrote: > Hello, > > During development and debug I typically use tons of NSLog()-messages to get > info what's happening. > I don't wish to include these messages to release-build so what is > common/recommended way to get rid of them? > > Should I comment them all out or is there some easier way to disable them or > should I just leave them as they are?
In theory you could do something like the following (not tried this myself)... #if defined(DEBUG) // or some other trigger for debug logging #define DLog(...) NSLog( __VA_ARGS__ ) #else #define DLog(...) #endif ... then in code ... DLog(@"blah"); DLog(@"blah %@", someObject); etc. -Shawn _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]