{"action":"created","issue":{"url":"https://api.github.com/repos/restify/node-restify/issues/1590","repository_url":"https://api.github.com/repos/restify/node-restify","labels_url":"https://api.github.com/repos/restify/node-restify/issues/1590/labels{/name}","comments_url":"https://api.github.com/repos/restify/node-restify/issues/1590/comments","events_url":"https://api.github.com/repos/restify/node-restify/issues/1590/events","html_url":"https://github.com/restify/node-restify/pull/1590","id":286583975,"number":1590,"title":"Custom fields from request in audit logger","user":{"login":"sfaizanh","id":2033963,"avatar_url":"https://avatars2.githubusercontent.com/u/2033963?v=4","gravatar_id":"","url":"https://api.github.com/users/sfaizanh","html_url":"https://github.com/sfaizanh","followers_url":"https://api.github.com/users/sfaizanh/followers","following_url":"https://api.github.com/users/sfaizanh/following{/other_user}","gists_url":"https://api.github.com/users/sfaizanh/gists{/gist_id}","starred_url":"https://api.github.com/users/sfaizanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfaizanh/subscriptions","organizations_url":"https://api.github.com/users/sfaizanh/orgs","repos_url":"https://api.github.com/users/sfaizanh/repos","events_url":"https://api.github.com/users/sfaizanh/events{/privacy}","received_events_url":"https://api.github.com/users/sfaizanh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-01-07T17:13:57Z","updated_at":"2018-03-27T18:34:53Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/restify/node-restify/pulls/1590","html_url":"https://github.com/restify/node-restify/pull/1590","diff_url":"https://github.com/restify/node-restify/pull/1590.diff","patch_url":"https://github.com/restify/node-restify/pull/1590.patch"},"body":"Currently there is not way to log custom fields in auditLogger, This PR support custom logging for auditlogger\r\n```\r\nrestify.plugins.auditLogger({\r\n    log: bunyan.createLogger({\r\n    name: 'audit',\r\n    streams: [\r\n        {\r\n            level: 'info',\r\n            type: 'raw'\r\n        }\r\n    ]\r\n    }),\r\n    event: 'after',\r\n    customFields: ['user']\r\n})\r\n```\r\nPre-Submission Checklist\r\n- [x] Opened an issue discussing these changes before opening the PR\r\n- [x] Ran the linter and tests via make prepush\r\n- [x] Included comprehensive and convincing tests for changes\r\n\r\n**Closes:**\r\nIssue #1343 "},"comment":{"url":"https://api.github.com/repos/restify/node-restify/issues/comments/376629774","html_url":"https://github.com/restify/node-restify/pull/1590#issuecomment-376629774","issue_url":"https://api.github.com/repos/restify/node-restify/issues/1590","id":376629774,"user":{"login":"hekike","id":1764512,"avatar_url":"https://avatars0.githubusercontent.com/u/1764512?v=4","gravatar_id":"","url":"https://api.github.com/users/hekike","html_url":"https://github.com/hekike","followers_url":"https://api.github.com/users/hekike/followers","following_url":"https://api.github.com/users/hekike/following{/other_user}","gists_url":"https://api.github.com/users/hekike/gists{/gist_id}","starred_url":"https://api.github.com/users/hekike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hekike/subscriptions","organizations_url":"https://api.github.com/users/hekike/orgs","repos_url":"https://api.github.com/users/hekike/repos","events_url":"https://api.github.com/users/hekike/events{/privacy}","received_events_url":"https://api.github.com/users/hekike/received_events","type":"User","site_admin":false},"created_at":"2018-03-27T18:34:53Z","updated_at":"2018-03-27T18:34:53Z","author_association":"MEMBER","body":"@sfaizanh yes, sry for the delay. One last comment."}}
{"actor":{"display_login":"hekike"}}