RestKit/RestKit — pull request #2014 by sadlerjw (2014-08-22 17:42:45+00:00)
Title: Don't log potentially sensitive information at Error/Warning/Info log levels

Hi folks,
I realize that this idea may require some discussion, but since I already have code written I figured I'd open a PR rather than a regular issue.

**The problem:** some services that are important to development (like Crashlytics) collect the app's logs and send it to their servers. Many companies (such as the one I work for!) have legal requirements that no personally identifiable information (or other sensitive information) gets sent to 3rd parties. We've audited all of our own logging, plus we identified a few places where RestKit would log out the entire response from the server, or key/value pairs of mapped data at the Error and Warning logging levels. This means that if we ship the app with any RestKit logging enabled (other than Critical log level), we risk sending sensitive information to 3rd parties like Crashlytics.

**The proposal:** Apps should be able to ship with RestKit set to log at the Info logging level. With that in mind, the code in this PR identifies sensitive information and demotes logging that information down to the Debug logging level.

I'm happy to have a discussion around whether or not this is the right solution. I'm not tied to the code I've written here, so I'd very much like to hear thoughts from other folks.