• 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: Yvan BARTHÉLEMY <email@hidden>
  • Date: Wed, 29 Oct 2008 14:06:04 +0100

Hi,

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.

Regards,
Yvan

Le 28 oct. 08 à 19:01, Karl Moskowski a écrit :

I've been experimenting with replacing my app's logging with Apple System Logger. When it comes to multi-byte characters, every thing looks OK in Console.app. However, Xcode's console shows things incorrectly. It probably won't come up often, but I'm wondering if it's fixable.

For example, this bit of code:
NSLog(@"あ");
aslclient client = asl_open(NULL, NULL, ASL_OPT_STDERR); // add STDERR's fd to the connection's set of fds so things show up in Xcode's console
asl_log(client, NULL, ASL_LEVEL_ERR, "あ");
asl_close(client);


Results in this output in Xcode:
	2008-10-28 13:49:19.767 ASL[3484:10b] あ
	Tue Oct 28 13:49:19 iMac.local ASL[3484] <Error>: \M-c\M^A\M^B

The call to NSLog displays correctly, but asl_log doesn't.

(In case it doesn't survive email, the character in quotes is Hiragana Letter A, from Leopard's Character Palette > East Asian Scripts > Hiragana > first character.)

_______________________________________________

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: Jason Coco <email@hidden>
References: 
 >ASL & Unicode in Xcode's Console (From: Karl Moskowski <email@hidden>)

  • Prev by Date: Path handling routines
  • Next by Date: Re: Path handling routines
  • Previous by thread: Re: ASL & Unicode in Xcode's Console
  • Next by thread: Re: ASL & Unicode in Xcode's Console
  • Index(es):
    • Date
    • Thread