Last active
August 29, 2015 14:06
-
-
Save endorama/ee0624d2798585590311 to your computer and use it in GitHub Desktop.
FilterLog example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
[...] | |
addWithData: function(msg, data) { | |
var copy = angular.copy(data); | |
this.maskReserved(copy); | |
$log.debug(msg + ' :: ' + copy, type); | |
}, | |
maskReserved: function(obj) { | |
for (var key in obj) { | |
if (obj.hasOwnProperty(key)) { | |
if (typeof obj[key] === "object") { | |
this.maskReserved(obj[key]); | |
} | |
else { | |
if (key === 'password') { | |
obj[key] = '**********'; | |
} | |
} | |
} | |
} | |
}, | |
[...] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment