Re: log file in apple system log
Re: log file in apple system log
- Subject: Re: log file in apple system log
- From: Ben Gollmer <email@hidden>
- Date: Mon, 16 May 2011 20:00:12 -0400
On May 16, 2011, at 7:23 PM, Rainer Standke wrote:
> Hello,
>
> I am trying to have my Mac app log info in such a way that a log file will be visible in the Console app, and the logfile is managed by syslogd.
>
> I am playing with asl_log and friends, and I can make things appear in the system log. How do I cause the creation of a distinct log file for the app, and its appearance in Console?
This doesn't have much to do with Cocoa, but it sounds like you want asl_add_log_file(). From asl(3):
> asl_add_log_file(asl, fd) adds the file descriptor fd to the a set of
> file descriptors associated with the client handle asl. Each log message
> sent by that client handle is also written to these file descriptors.
> Returns 0 on success, non-zero on failure.
--
Ben
_______________________________________________
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