Re: ASL & Unicode in Xcode's Console
Re: ASL & Unicode in Xcode's Console
- Subject: Re: ASL & Unicode in Xcode's Console
- From: Jason Coco <email@hidden>
- Date: Wed, 29 Oct 2008 09:41:07 -0400
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
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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