{"action":"created","issue":{"url":"https://api.github.com/repos/villadora/express-bunyan-logger/issues/25","repository_url":"https://api.github.com/repos/villadora/express-bunyan-logger","labels_url":"https://api.github.com/repos/villadora/express-bunyan-logger/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/villadora/express-bunyan-logger/issues/25/comments","events_url":"https://api.github.com/repos/villadora/express-bunyan-logger/issues/25/events","html_url":"https://github.com/villadora/express-bunyan-logger/pull/25","id":61236346,"number":25,"title":"Added a 'deep exclusion' function ","user":{"login":"jkerrwilson","id":6012438,"avatar_url":"https://avatars.githubusercontent.com/u/6012438?v=3","gravatar_id":"","url":"https://api.github.com/users/jkerrwilson","html_url":"https://github.com/jkerrwilson","followers_url":"https://api.github.com/users/jkerrwilson/followers","following_url":"https://api.github.com/users/jkerrwilson/following{/other_user}","gists_url":"https://api.github.com/users/jkerrwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/jkerrwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkerrwilson/subscriptions","organizations_url":"https://api.github.com/users/jkerrwilson/orgs","repos_url":"https://api.github.com/users/jkerrwilson/repos","events_url":"https://api.github.com/users/jkerrwilson/events{/privacy}","received_events_url":"https://api.github.com/users/jkerrwilson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-13T20:55:25Z","updated_at":"2016-02-18T13:32:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/villadora/express-bunyan-logger/pulls/25","html_url":"https://github.com/villadora/express-bunyan-logger/pull/25","diff_url":"https://github.com/villadora/express-bunyan-logger/pull/25.diff","patch_url":"https://github.com/villadora/express-bunyan-logger/pull/25.patch"},"body":"Which allows specific properties of sub-objects to be uniquely chosen for exclusion.\r\n\r\nWe required this functionality to exclude potentially sensitive information from logs such as authorization tokens, or passwords send with authentication requests. The current excludes feature does not allow for partial logging of meta data, and we did not want to exclude the entire 'body' but just sensitive parts of it.\r\n\r\n\r\nNote that the current excludes functionality is preserved.\r\n\r\n\r\nTo exclude object properties on a deeper level, an object can be passed as the excludes option:\r\n\r\n``` javascript\r\n        app.use(require('express-bunyan-logger')({\r\n            logger: newLogger,\r\n            excludes: {'body':['password']}\r\n        }));\r\n```\r\n\r\nThe function searches the object hierarchy provided and excludes only those properties specified in the base list. In the case above, any body properties called password will be removed. The \"*\" feature of the previous functionality is also preserved on sub-levels. The search is recursive, so more than one level can be specified."},"comment":{"url":"https://api.github.com/repos/villadora/express-bunyan-logger/issues/comments/185719755","html_url":"https://github.com/villadora/express-bunyan-logger/pull/25#issuecomment-185719755","issue_url":"https://api.github.com/repos/villadora/express-bunyan-logger/issues/25","id":185719755,"user":{"login":"minispeck","id":12914451,"avatar_url":"https://avatars.githubusercontent.com/u/12914451?v=3","gravatar_id":"","url":"https://api.github.com/users/minispeck","html_url":"https://github.com/minispeck","followers_url":"https://api.github.com/users/minispeck/followers","following_url":"https://api.github.com/users/minispeck/following{/other_user}","gists_url":"https://api.github.com/users/minispeck/gists{/gist_id}","starred_url":"https://api.github.com/users/minispeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minispeck/subscriptions","organizations_url":"https://api.github.com/users/minispeck/orgs","repos_url":"https://api.github.com/users/minispeck/repos","events_url":"https://api.github.com/users/minispeck/events{/privacy}","received_events_url":"https://api.github.com/users/minispeck/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T13:32:49Z","updated_at":"2016-02-18T13:32:49Z","body":"@marcbachmann thank you so much!!! I tried many ways to get my res serializer to exclude certain fields  from the body. I couldn't find any info on how to do this or much detail about serializers in general.\r\n\r\nwould i still have a res serializer? would both be used in the case of a res with a body? I'm a little unclear on how these work as all the examples i've seen are the top level (req, res, err)\r\n\r\nthanks!"}}