In fact I am very interested about this undocumented call as it is painful for me to dig into darwin sources.

Thanks,
Yvan

Le 29 oct. 08 à 14:41, Jason Coco a écrit :


On Oct 29, 2008, at 09:06 , Yvan BARTHÉLEMY wrote:

A solution for this is to not use directly asl_log, but wrap it to a function that will then use asl_log for console, and fprintf for logging to stderr (instead of asl_open(stderr)), of course you will have to regenerate yourself date, host name, process name, process id information if needed when using fprintf.

Yeah, that's basically the solution I used, but didn't really bother with re-generating the log information. I also used an undocumented call that I found on the asl source code that let me specify the encoding that I wanted instead of defaulting to that stupid "visual" encoding for the console. But I wrapped the ASL stuff in an Objective-C class so I just added code that if the level was ASL_LEVEL_DEBUG and NDEBUG wasn't defined, the data went to stderr as well as the logging system.

J

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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