BAS use of asl_log()
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