• 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: log file in apple system log
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >log file in apple system log (From: Rainer Standke <email@hidden>)

  • Prev by Date: Scrolling to a point in WebView
  • Next by Date: Re: Core Animation animations stop prematurely at random
  • Previous by thread: log file in apple system log
  • Next by thread: Scrolling to a point in WebView
  • Index(es):
    • Date
    • Thread