{"action":"created","issue":{"url":"https://api.github.com/repos/balabit/syslog-ng/issues/1389","repository_url":"https://api.github.com/repos/balabit/syslog-ng","labels_url":"https://api.github.com/repos/balabit/syslog-ng/issues/1389/labels{/name}","comments_url":"https://api.github.com/repos/balabit/syslog-ng/issues/1389/comments","events_url":"https://api.github.com/repos/balabit/syslog-ng/issues/1389/events","html_url":"https://github.com/balabit/syslog-ng/pull/1389","id":215722256,"number":1389,"title":"cfg-lexer: fix token duplication in the output of '--preprocess-into'","user":{"login":"MrAnno","id":3130044,"avatar_url":"https://avatars0.githubusercontent.com/u/3130044?v=3","gravatar_id":"","url":"https://api.github.com/users/MrAnno","html_url":"https://github.com/MrAnno","followers_url":"https://api.github.com/users/MrAnno/followers","following_url":"https://api.github.com/users/MrAnno/following{/other_user}","gists_url":"https://api.github.com/users/MrAnno/gists{/gist_id}","starred_url":"https://api.github.com/users/MrAnno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrAnno/subscriptions","organizations_url":"https://api.github.com/users/MrAnno/orgs","repos_url":"https://api.github.com/users/MrAnno/repos","events_url":"https://api.github.com/users/MrAnno/events{/privacy}","received_events_url":"https://api.github.com/users/MrAnno/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},{"id":535802262,"url":"https://api.github.com/repos/balabit/syslog-ng/labels/jenkins-test","name":"jenkins-test","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-03-21T12:34:13Z","updated_at":"2017-03-22T18:16:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/balabit/syslog-ng/pulls/1389","html_url":"https://github.com/balabit/syslog-ng/pull/1389","diff_url":"https://github.com/balabit/syslog-ng/pull/1389.diff","patch_url":"https://github.com/balabit/syslog-ng/pull/1389.patch"},"body":"This PR fixes an old token duplication issue in the output of the `--preprocess-into` command line option.\r\n\r\nSince every token in a `CfgTokenBlock` is an 'injected token', the injected flag should be set in all cases.\r\n\r\n---------------------------\r\n\r\n## Configuration\r\n\r\n- `etc/syslog-ng-example.conf`:\r\n```\r\n@version: 3.9\r\n\r\nparser p_parser {};\r\nfilter f_filter { host(\"\"); };\r\nrewrite r_rewrite {};\r\n\r\nsource s_source {};\r\ndestination d_destination {};\r\n\r\nlog {};\r\n```\r\n\r\n## Steps to reproduce\r\n\r\n1. Start syslog-ng: `sbin/syslog-ng -Fedv -f etc/syslog-ng-example.conf --preprocess-into test.txt`\r\n\r\n2. cat test.txt\r\n\r\nExample output (notice the duplicated '}' tokens):\r\n\r\n```\r\n@version: 3.9\r\n\r\nparser p_parserke {}};\r\nfilter f_filter { host(\"\"); }};\r\nrewrite r_rewrite {}};\r\n\r\nsource s_source {};\r\ndestination d_destination {};\r\n\r\nlog {};\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/balabit/syslog-ng/issues/comments/288491610","html_url":"https://github.com/balabit/syslog-ng/pull/1389#issuecomment-288491610","issue_url":"https://api.github.com/repos/balabit/syslog-ng/issues/1389","id":288491610,"user":{"login":"kira-syslogng","id":25661985,"avatar_url":"https://avatars3.githubusercontent.com/u/25661985?v=3","gravatar_id":"","url":"https://api.github.com/users/kira-syslogng","html_url":"https://github.com/kira-syslogng","followers_url":"https://api.github.com/users/kira-syslogng/followers","following_url":"https://api.github.com/users/kira-syslogng/following{/other_user}","gists_url":"https://api.github.com/users/kira-syslogng/gists{/gist_id}","starred_url":"https://api.github.com/users/kira-syslogng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kira-syslogng/subscriptions","organizations_url":"https://api.github.com/users/kira-syslogng/orgs","repos_url":"https://api.github.com/users/kira-syslogng/repos","events_url":"https://api.github.com/users/kira-syslogng/events{/privacy}","received_events_url":"https://api.github.com/users/kira-syslogng/received_events","type":"User","site_admin":false},"created_at":"2017-03-22T18:16:51Z","updated_at":"2017-03-22T18:16:51Z","body":"Build ERROR\n"}}
{"actor":{"display_login":"kira-syslogng"}}