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?
- Objective-C category is not loaded - How to debug this
- RestKit and AFNetworking build error
- How do I use basic auth with RestKit's getObject?
- Restkit on Xcode 4.5 GM does not work on iOS 6 device - file was built for archive which is not the architecture being linked
- Restkit json error response msg from server
- No such module 'RestKit' with cocoapods and swift
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/
- Specify to call someting when main thread is idle
- Xcode Service: Select Git Branch
- Application Loader reports missing code-signing certificate
- ASIHTTPRequest: https with SSL
- Check if array contains part of a string in Swift?
- iOS 7 — navigationController is setting the contentInset and ContentOffset of my UIScrollView
- Difference between these two NSString methods
- hide keyboard for text field in swift programming language
- What makes a completion handler execute the block when your task of interest is complete?
- Memory leak detection tools
- Unable to add App ID because the '10' App ID limit in '7' days has been exceeded
- user action in uiviews buttons disabled after frame resizing
- Read a .txt file inside documents directory
- Programming Games for iPhone
- iOS5 unable to read symbols for Riven.bundle (file not found)