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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to