• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSLog on releasebuild
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSTask (From: Torsten Curdt <email@hidden>)
 >Re: NSTask (From: Michael Watson <email@hidden>)
 >NSLog on releasebuild (From: Mike <email@hidden>)
 >Re: NSLog on releasebuild (From: "Shawn Erickson" <email@hidden>)
 >Re: NSLog on releasebuild (From: Nate Weaver <email@hidden>)
 >Re: NSLog on releasebuild (From: Jean-Daniel Dupas <email@hidden>)
 >Re: NSLog on releasebuild (From: Nate Weaver <email@hidden>)

  • Prev by Date: Re: NSString sizeWithAttributes inaccuracy
  • Next by Date: NSTableView NSTrackingArea and mouse clicks
  • Previous by thread: Re: NSLog on releasebuild
  • Next by thread: Re: NSLog on releasebuild
  • Index(es):
    • Date
    • Thread