• 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
BAS use of asl_log()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BAS use of asl_log()


  • Subject: BAS use of asl_log()
  • From: Todd Heberlein <email@hidden>
  • Date: Thu, 16 Apr 2009 12:40:59 -0700

I am looking the Apple's "Better Authorization Sample" code to figure out how to launch privileged helper tools from a Cocoa app. The BAS code includes use of asl_log(), but sometimes the <format> field is a string literal like:

err = asl_log(asl, aslMsg, ASL_LEVEL_ERR, "Request failed: %m");


and sometimes <format> is a variable like:

const char * errStr = NULL;
...
errStr = "Unexpected error while accepting a connection: %m";
...
err = asl_log(asl, aslMsg, ASL_LEVEL_ERR, errStr);


Is there a requirement that at compile time the <format> field be known (as in the first example), or can it also be generated at run time (as in the second condition)?


Thanks,

Todd

_______________________________________________

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


  • Follow-Ups:
    • Re: BAS use of asl_log()
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: Reading in dictionary from txt file: options for speed
  • Next by Date: Re: QTMovieDidEndNotification
  • Previous by thread: Re: IsBadCodePtr in Cocoa or Unix?
  • Next by thread: Re: BAS use of asl_log()
  • Index(es):
    • Date
    • Thread