• 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
Re: ASL & Unicode in Xcode's Console
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: ASL & Unicode in Xcode's Console
      • From: Yvan BARTHÉLEMY <email@hidden>
References: 
 >ASL & Unicode in Xcode's Console (From: Karl Moskowski <email@hidden>)
 >Re: ASL & Unicode in Xcode's Console (From: Yvan BARTHÉLEMY <email@hidden>)

  • Prev by Date: Re: Open Window from Input Manager
  • Next by Date: Re: ASL & Unicode in Xcode's Console
  • Previous by thread: Re: ASL & Unicode in Xcode's Console
  • Next by thread: Re: ASL & Unicode in Xcode's Console
  • Index(es):
    • Date
    • Thread