Latest 0.0.1
License MIT


Redact sensitive strings from your logs with [obj redactedDescription], similar to Rails filter_parameters.

By default redacts the password property for dictionaries and basic key value styled logs.

Redact a dictionary

[@{@"password": "secret",@"username": @"user01"} redactedDescription]
-> {
     password: [REDACTED];
     username: "user01";

Redact a string

[@"password = secret; username = user01" redactedDescription]
-> password = [REDACTED]; username = user01


#import "Redact.h"

Then use [obj redactedDescription];

or use RedactedLog() instead of NSLog() by adding one of the following macro sinto your .pch file

#define NSLog RedactedLogF // if you would like filename and function name
// or
#define NSLog RedactedLog // cleaner log and without any extra meta info

By default password is a redacted key, but it’s easy to add more.

[NCRedact addRedactedKey:@"secret_key"];

or use redact to trim your logs down

NSString *path = [[NSBundle mainBundle] bundlePath];
[NCRedact addRedactedString:path with:@"[BUNDLE]"];


To run the test cases; clone the repo, and run pod install from the Example directory. Then open the workspace and run the tests.


Redact is available through CocoaPods, to install
it simply add the following line to your Podfile:

pod "Redact"


Daniel Brooker, [email protected], @DraconisNZ


Redact is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "Redact",
    "version": "0.0.1",
    "summary": "Redact passwords or unnessary details from logs and strings",
    "description": "                       Redact sensitive strings from your logs with [obj redactedDescription],n                       similar to Rails filter_parameters.n                       n                       By default redacts the password property for objects and dictionaries.n",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Daniel Brooker": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.0.1"
    "social_media_url": "",
    "requires_arc": true,
    "source_files": "Classes",
    "ios": {
        "exclude_files": "Classes/osx"
    "osx": {
        "exclude_files": "Classes/ios"

Pin It on Pinterest

Share This