iPhone RestKit how to enable RKLogDebug?
I’m trying to debug RestKit object mapping and noticed that there are calls to
RKLogDebug throughout the code, but it appears that that macro is undefined somewhere. How can I enable it?
2 Solutions Collect From Internet About “iPhone RestKit how to enable RKLogDebug?”
You want to add something like this:
RKLogConfigureByName("RestKit", RKLogLevelWarning); RKLogConfigureByName("RestKit/ObjectMapping", RKLogLevelTrace); RKLogConfigureByName("RestKit/Network", RKLogLevelTrace);
to your code. See RKLog.h for the various levels. It is pretty trick.
N.B. this supports a wildcard at the end so, e.g.,
RKLogConfigureByName("*", RKLogLevelTrace); // set all logs to trace, RKLogConfigureByName("RestKit*", RKLogLevelWarning); // set all RestKit logs to warning (leaving the app-specific log untouched).
– Thanks Kevin!
As described in first answer you can configure your app to specific component by calling
You can also configure RestKit for specific component using Environment Variables in Xcode scheme. This is useful especially when you have your app building continuously for different environments.
Here’s detailed explanation of RestKit logging http://restkit-tutorials.com/logging-in-restkit-debug-tips/
- How do I refactor swift in Xcode?
- Xcode Script – Get Bundle ID from build settings instead of info.plist
- In Swift, how to generically limit function to types that understand T + T
- UICollectionView Floating Headers on Top and Side
- Xcode remember what folders were collapsed / opened
- Make a UIBarButtonItem disappear using swift IOS
- Check network status in Swift, Could not find an overload for '~=' that accepts the supplied arguments
- Code for alert action of UILocalNotification
- iOS UIScrollView performance
- How to perform some action on Play and Pause actions of AVPlayer?
- Duplicate symbol error in Xcode
- Xcode 6 Beta not compiling
- Missing argument for parameter #1 in call error for function with no params. Swift
- iOS Development: When receiving a Game Center invite, how do I obtain the GKMatch object?
- How to change UICollectionView Scroll Direction?