Re: NSLog on releasebuild
Re: NSLog on releasebuild
- Subject: Re: NSLog on releasebuild
- From: "Michael Ash" <email@hidden>
- Date: Thu, 24 Jul 2008 20:12:00 -0400
On Thu, Jul 24, 2008 at 1:35 PM, Nate Weaver <email@hidden> wrote:
> You're right, of course (I forgot about this).
>
> I think I decided not to worry about it too much since it shouldn't make it
> into production code (if it does, then I did something wrong). My main goal
> was to keep the macro as simple as I could (or at least, not have to break
> it onto multiple lines), and having the full path to a file felt like it
> would add to the clutter.
Putting potentially subtle and difficult-to-find bugs in your
debugging code is in many ways worse than putting into your production
code, since it's really tough to debug stuff if you can't even rely on
the code that lets you find out what's wrong.
As a real simple fix, [[NSString stringWithUTF8String:__FILE__]
lastPathComponent] will give you equivalent functionality without the
mess, if you use %@ instead of %s in the format string.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden