• 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: Shaun Wexler <email@hidden>
  • Date: Sat, 13 Mar 2004 12:48:13 -0800

On Mar 13, 2004, at 10:30 AM, Chris Hanson wrote:

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.

MacFOH keeps its own log file in ~/Library/Logs. I think that is much nicer, and certainly handy for me as a developer.

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.

I wrote my own snappy little framework for logging: SKWLog. It captures stderr output, and keeps the per-session data while appending to the application's log file, all with one background thread. That way, NSLog() doesn't slow down an application, AFAIK. You can also write directly to SKWLog, avoiding the NSLog overhead. It also provides a shared NSWindow and/or a shared NSPanel, and other windows. It's Panther-only, as it was first created to play with NSOutputStream, and it relies on several new 10.3 features.

http://www.skwdev.com/developer/frameworks/SKWLog.dmg

Free for development purposes. If you use it in a shipping product, add a credit and send me a copy! There is an example application Xcode project included, which kicks the tires, but it's quite customizable.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
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.


References: 
 >Leave NSLog()s in Final Product? (From: Jerry Krinock <email@hidden>)
 >Re: Leave NSLog()s in Final Product? (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: NSTimer discarding exception 'NSInternalInconsistencyException'
  • Next by Date: Re: Can't create an NSBundle
  • Previous by thread: Re: Leave NSLog()s in Final Product?
  • Next by thread: Re: Leave NSLog()s in Final Product? - solution
  • Index(es):
    • Date
    • Thread