{"action":"created","issue":{"url":"https://api.github.com/repos/balabit/syslog-ng/issues/1913","repository_url":"https://api.github.com/repos/balabit/syslog-ng","labels_url":"https://api.github.com/repos/balabit/syslog-ng/issues/1913/labels{/name}","comments_url":"https://api.github.com/repos/balabit/syslog-ng/issues/1913/comments","events_url":"https://api.github.com/repos/balabit/syslog-ng/issues/1913/events","html_url":"https://github.com/balabit/syslog-ng/pull/1913","id":302033975,"number":1913,"title":"python3 compatibility fixes, virtualenv support & fix for the interactive debugger","user":{"login":"bazsi","id":714102,"avatar_url":"https://avatars3.githubusercontent.com/u/714102?v=4","gravatar_id":"","url":"https://api.github.com/users/bazsi","html_url":"https://github.com/bazsi","followers_url":"https://api.github.com/users/bazsi/followers","following_url":"https://api.github.com/users/bazsi/following{/other_user}","gists_url":"https://api.github.com/users/bazsi/gists{/gist_id}","starred_url":"https://api.github.com/users/bazsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bazsi/subscriptions","organizations_url":"https://api.github.com/users/bazsi/orgs","repos_url":"https://api.github.com/users/bazsi/repos","events_url":"https://api.github.com/users/bazsi/events{/privacy}","received_events_url":"https://api.github.com/users/bazsi/received_events","type":"User","site_admin":false},"labels":[{"id":104723147,"url":"https://api.github.com/repos/balabit/syslog-ng/labels/in%20progress","name":"in progress","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":30,"created_at":"2018-03-03T21:30:06Z","updated_at":"2018-03-29T07:17:13Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/balabit/syslog-ng/pulls/1913","html_url":"https://github.com/balabit/syslog-ng/pull/1913","diff_url":"https://github.com/balabit/syslog-ng/pull/1913.diff","patch_url":"https://github.com/balabit/syslog-ng/pull/1913.patch"},"body":"\r\nThis is an attempt to fix Python3 compatibility and includes a number of related fixes. Please check individual patches for a summary."},"comment":{"url":"https://api.github.com/repos/balabit/syslog-ng/issues/comments/377145393","html_url":"https://github.com/balabit/syslog-ng/pull/1913#issuecomment-377145393","issue_url":"https://api.github.com/repos/balabit/syslog-ng/issues/1913","id":377145393,"user":{"login":"furiel","id":11007226,"avatar_url":"https://avatars0.githubusercontent.com/u/11007226?v=4","gravatar_id":"","url":"https://api.github.com/users/furiel","html_url":"https://github.com/furiel","followers_url":"https://api.github.com/users/furiel/followers","following_url":"https://api.github.com/users/furiel/following{/other_user}","gists_url":"https://api.github.com/users/furiel/gists{/gist_id}","starred_url":"https://api.github.com/users/furiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/furiel/subscriptions","organizations_url":"https://api.github.com/users/furiel/orgs","repos_url":"https://api.github.com/users/furiel/repos","events_url":"https://api.github.com/users/furiel/events{/privacy}","received_events_url":"https://api.github.com/users/furiel/received_events","type":"User","site_admin":false},"created_at":"2018-03-29T07:17:13Z","updated_at":"2018-03-29T07:17:13Z","author_association":"CONTRIBUTOR","body":"Sorry I was confusing before: the messages of course did not store integer objects. We were only allowed to pass integer objects to setattr. With the +1 above I only intended to show the type of self.counter is int. The complete process function is\r\n```\r\n    def parse(self, msg):\r\n        match = self.regex.match(msg[\"MESSAGE\"])\r\n        if match:\r\n            for key, value in match.groupdict().items():\r\n                print(\"key: %s, value: %s\" % (key, value))\r\n                msg[key] = value\r\n            msg[\"MY_COUNTER\"] = self.counter\r\n            self.counter += 1\r\n            return True\r\n        return False\r\n```\r\nwhen `self.counter` is initialized to 0 in the `init` method. In the end we just check the counter value as string in a templated filesource:\r\n```\r\ntemplate='\"[...] my_counter: $MY_COUNTER\\\\n\"'\r\n```"}}
{"actor":{"display_login":"furiel"}}