Re: Application logging
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