• 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
When I don't want NSLog() for normal use?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

When I don't want NSLog() for normal use?


  • Subject: When I don't want NSLog() for normal use?
  • From: Hisaoki Nishida <email@hidden>
  • Date: Thu, 24 Oct 2002 00:47:00 -0400

I am using NSLog (and NSAssert for errors) for simple code tracing but I obviously I don't want to log them for normal use, as it is waste of CPU.

So I have to do something like:

if(kTrace) NSLog(@"blabla...");

But to do this I need to declare a global header for kTrace and I feel it's just so messy and awkward.
Is there an alternative way to do this? How do you implement debugging?

Thank you.

-Yuki
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: When I don't want NSLog() for normal use?
      • From: Bob Frank <email@hidden>
    • Re: When I don't want NSLog() for normal use?
      • From: Patrick Narkinsky <email@hidden>
    • Re: When I don't want NSLog() for normal use?
      • From: Brian Redman <email@hidden>
    • Re: When I don't want NSLog() for normal use?
      • From: dan sandler <email@hidden>
  • Prev by Date: Extending selection in NSTextView
  • Next by Date: [OT] Help Viewer blows
  • Previous by thread: Extending selection in NSTextView
  • Next by thread: Re: When I don't want NSLog() for normal use?
  • Index(es):
    • Date
    • Thread