• 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: XCode 5 - Logging
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode 5 - Logging


  • Subject: Re: XCode 5 - Logging
  • From: Cody Garvin <email@hidden>
  • Date: Fri, 01 Aug 2014 06:55:00 -0700

That is NSLog that is doing that, you’d need to create your own logging method. 

I usually create my own logging library. NSLog doesn’t cut it now days :)

I have logMessage, logWarning, logError, logErrorToFile, etc

You can define it such as:
#define SVSLog(fmt, ...) [SVSLog logMessage:@"%s [Line %d] " fmt, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__]


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);

This gives me what I want, and slightly more configuration.

This document should help.
https://developer.apple.com/library/ios/qa/qa1669/_index.html
https://developer.apple.com/library/ios/documentation/corefoundation/Reference/CFTypeRef/Reference/reference.html#//apple_ref/doc/uid/20001203-CH201-F11096

- Cody

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
  • Follow-Ups:
    • Re: XCode 5 - Logging
      • From: Jens Alfke <email@hidden>
References: 
 >XCode 5 - Logging (From: Dave <email@hidden>)

  • Prev by Date: XCode 5 - Logging
  • Next by Date: Re: Swift: what is the difference between properties and functions?
  • Previous by thread: XCode 5 - Logging
  • Next by thread: Re: XCode 5 - Logging
  • Index(es):
    • Date
    • Thread