Re: Logging Mechanisms in Cocoa
Re: Logging Mechanisms in Cocoa
- Subject: Re: Logging Mechanisms in Cocoa
- From: Timothy Reaves <email@hidden>
- Date: Sun, 10 Feb 2008 20:42:14 -0500
On Feb 10, 2008, at 2:18 AM, Jens Alfke wrote:
On 9 Feb '08, at 8:23 PM, Timothy Reaves wrote:
asl isn't any better than NSLog, even though that blog post claims
it is.
Yes, it is. Instead of being dumped as text to stderr, the log
entries get stored in a structured form that makes it easy to query
based on things like the process name. ASL lets you add your own key/
value metadata pairs, which the API can later query on (you can also
use Console.app in Leopard to build custom queries. I found this
really useful for making queries that would show only logs from my
specific subsystems of framework, across all processes it runs in.)
Being able to turn different log levels on/off is great, but that's
not what ASL is about. ASL is just about storing structured,
queryable data in the system log. The kind of stuff you're
describing is orthogonal to that.
—Jens
Not sure you've ever used NSLog() Jens. By default, in a running
application, it does indeed send to the system log file, not just
stdout or stderr. And a database is for "structured, queryable
data". Whereas a log file can be used for that, one in which other
apps are dumping non-structured data is just going to pollute the
issue. Orthogonal? That's a stretch, but if you say so._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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