• 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: Application logging
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Application logging


  • Subject: Re: Application logging
  • From: "I. Savant" <email@hidden>
  • Date: Mon, 23 Apr 2007 12:49:00 -0400

David:

Is there a class for this, or do I need to work with NSLog some how.

The most common practice for most applications is to log the information to the console (using NSLog()). If your application will be logging lots of things all the time, however, users won't appreciate hundreds of entries from your app drowning everything else out in the console, appending to a predetermined log file would be best.

 If the former approach works for you (ie, you're only logging the
occasional problem or informational text), it's as simple as:

NSLog(@"Error occurred executing foo.");

 If the latter, there are *many* possible approaches ranging from
simple to complicated, depending on the amount of granularity and
speed you desire/require.

 Of course the easiest approach is to immediately notify the user
(using the GUI) of an error, give details, and provide an easy
mechanism for contacting technical support from there. If more detail
is available than an average user should be exposed to, log the
*extra* information to the console with NSLog() and if you need it,
request it from the user.

--
I.S.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Application logging (From: "David Brennan" <email@hidden>)

  • Prev by Date: Application logging
  • Next by Date: Re: Request for Authors: Focused Cocoa Topic Books
  • Previous by thread: Application logging
  • Next by thread: Re: Application logging
  • Index(es):
    • Date
    • Thread