Re: XCode 5 - Logging
Re: XCode 5 - Logging
- Subject: Re: XCode 5 - Logging
- From: Jens Alfke <email@hidden>
- Date: Fri, 01 Aug 2014 08:32:29 -0700
On Aug 1, 2014, at 6:55 AM, Cody Garvin < email@hidden> wrote:
Within logMessage: I figure out which format to use, then display accordingly. Instead of using NSLog, use CFLog(). You’ll need to bridge the string built: CFLog((__bridge CFStringRef)yourMessageString);
There’s no CFLog function declared anywhere I can find. (I dimly recall it being a private API?)
Are you thinking of CFShow? That’s a debugging function that simply writes an object’s description to stderr. For logging, it’s easier just to call fprintf and get more formatting flexibility. The drawback of writing to stderr is that, unlike NSLog, the output doesn’t go into the system logging API (ASL) so it won’t show up in Console.app or in an iOS device’s archived logs.
I’m pressing you for details because I’d really like there to be a CF or Foundation level logging function with more flexibility than NSLog; I just haven’t been able to find one. This document should help.
Neither of those mention a CFLog function either.
—Jens |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden