{"action":"created","issue":{"url":"https://api.github.com/repos/ondergetekende/logshipper/issues/11","labels_url":"https://api.github.com/repos/ondergetekende/logshipper/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/ondergetekende/logshipper/issues/11/comments","events_url":"https://api.github.com/repos/ondergetekende/logshipper/issues/11/events","html_url":"https://github.com/ondergetekende/logshipper/pull/11","id":63795713,"number":11,"title":"Also pass file_path to the handler method","user":{"login":"Kami","id":125088,"avatar_url":"https://avatars.githubusercontent.com/u/125088?v=3","gravatar_id":"","url":"https://api.github.com/users/Kami","html_url":"https://github.com/Kami","followers_url":"https://api.github.com/users/Kami/followers","following_url":"https://api.github.com/users/Kami/following{/other_user}","gists_url":"https://api.github.com/users/Kami/gists{/gist_id}","starred_url":"https://api.github.com/users/Kami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kami/subscriptions","organizations_url":"https://api.github.com/users/Kami/orgs","repos_url":"https://api.github.com/users/Kami/repos","events_url":"https://api.github.com/users/Kami/events{/privacy}","received_events_url":"https://api.github.com/users/Kami/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-23T18:23:36Z","updated_at":"2015-03-23T18:57:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ondergetekende/logshipper/pulls/11","html_url":"https://github.com/ondergetekende/logshipper/pull/11","diff_url":"https://github.com/ondergetekende/logshipper/pull/11.diff","patch_url":"https://github.com/ondergetekende/logshipper/pull/11.patch"},"body":"With this change, we also pass file_path to the handler when a new line is detected.\r\n\r\nThis makes the whole thing more useful when monitoring / tailing multiple files. Previously it wasn't possible to know to which file the line refers to inside the handler function.\r\n\r\nI also updated the handler method call to use keyword arguments instead of a dictionary. I know this is a breaking change, but it makes things more explicit and code more introspectable.\r\n\r\nTODO:\r\n\r\n- [ ] Update existing tests\r\n- [ ] Add new tests"},"comment":{"url":"https://api.github.com/repos/ondergetekende/logshipper/issues/comments/85144360","html_url":"https://github.com/ondergetekende/logshipper/pull/11#issuecomment-85144360","issue_url":"https://api.github.com/repos/ondergetekende/logshipper/issues/11","id":85144360,"user":{"login":"kvdveer","id":419433,"avatar_url":"https://avatars.githubusercontent.com/u/419433?v=3","gravatar_id":"","url":"https://api.github.com/users/kvdveer","html_url":"https://github.com/kvdveer","followers_url":"https://api.github.com/users/kvdveer/followers","following_url":"https://api.github.com/users/kvdveer/following{/other_user}","gists_url":"https://api.github.com/users/kvdveer/gists{/gist_id}","starred_url":"https://api.github.com/users/kvdveer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvdveer/subscriptions","organizations_url":"https://api.github.com/users/kvdveer/orgs","repos_url":"https://api.github.com/users/kvdveer/repos","events_url":"https://api.github.com/users/kvdveer/events{/privacy}","received_events_url":"https://api.github.com/users/kvdveer/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T18:57:07Z","updated_at":"2015-03-23T18:57:07Z","body":"This is really a nice idea, thanks for that.\r\n\r\nI have a bit of a nitpick about the implementation. You've changed the arguments for `handler`. However, as far as I can see, the actual handler hasn't changed. Instead of changing the arguments for handler, I recommend adding a file_path entry to the original dict. That's the way `SyslogHandler` communicates its peer address. "}}