• 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: Leave NSLog()s in Final Product?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leave NSLog()s in Final Product?


  • Subject: Re: Leave NSLog()s in Final Product?
  • From: Chris Hanson <email@hidden>
  • Date: Sat, 13 Mar 2004 13:30:27 -0500

On Mar 12, 2004, at 9:26 AM, Jerry Krinock wrote:
Do these NSLog() calls do anything when an application is not launched from
Terminal?

Yes, they log to console. This means your application, every time it runs, will generate reams of information in the user's console, which is generally impolite.

A better idea might be to switch to Bob Frank's Log4Cocoa framework <http://log4cocoa.sourceforge.net/>. You can leave your logging in your code and have whether or not logging is on, what level of logging is desired, and where the log should go (console, a file, etc.) configured via some user defaults that are normally off.

This way you can either add a couple (possibly hidden) preferences for your application's logging features, leave all of your logging code in the final product, and even make the logging information semantically richer by using several different log levels.

-- Chris

--
Chris Hanson <email@hidden>
bDistributed.com, Inc.
Outsourcing Vendor Evaluation
Custom Mac OS X Development
Cocoa Developer Training
_______________________________________________
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: Leave NSLog()s in Final Product? - solution
      • From: Jerry Krinock <email@hidden>
    • Re: Leave NSLog()s in Final Product?
      • From: Shaun Wexler <email@hidden>
References: 
 >Leave NSLog()s in Final Product? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: obj-c functions versus class methods
  • Next by Date: Re: Clicking Dock Icon creates a new window
  • Previous by thread: Re: Leave NSLog()s in Final Product?
  • Next by thread: Re: Leave NSLog()s in Final Product?
  • Index(es):
    • Date
    • Thread