{"action":"created","issue":{"url":"https://api.github.com/repos/twitter/util/issues/82","repository_url":"https://api.github.com/repos/twitter/util","labels_url":"https://api.github.com/repos/twitter/util/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/twitter/util/issues/82/comments","events_url":"https://api.github.com/repos/twitter/util/issues/82/events","html_url":"https://github.com/twitter/util/issues/82","id":26139124,"number":82,"title":"SyslogFormatter doesn't handle multiline messages well","user":{"login":"plainlystated","id":37447,"avatar_url":"https://avatars.githubusercontent.com/u/37447?v=3","gravatar_id":"","url":"https://api.github.com/users/plainlystated","html_url":"https://github.com/plainlystated","followers_url":"https://api.github.com/users/plainlystated/followers","following_url":"https://api.github.com/users/plainlystated/following{/other_user}","gists_url":"https://api.github.com/users/plainlystated/gists{/gist_id}","starred_url":"https://api.github.com/users/plainlystated/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plainlystated/subscriptions","organizations_url":"https://api.github.com/users/plainlystated/orgs","repos_url":"https://api.github.com/users/plainlystated/repos","events_url":"https://api.github.com/users/plainlystated/events{/privacy}","received_events_url":"https://api.github.com/users/plainlystated/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-01-23T01:52:17Z","updated_at":"2016-05-24T13:52:49Z","closed_at":"2016-05-24T13:52:49Z","body":"The SyslogFormatter overrides lineterminator (to be \"\"), which means logs go to syslog as a single line. However, each sub-line (what would be a line in the default logger) still gets the priority & timestamp prefix, which makes for a very unreadable line.\r\n\r\nFor instance, here's my config:\r\n```\r\nnew SyslogHandlerConfig {\r\n  formatter = new SyslogFormatterConfig{\r\n    serverName = \"myserver\"\r\n  }\r\n}\r\n```\r\n\r\nThe following lines look fine:\r\n```\r\nJan 22 19:43:35 app01.sea01.staging.abc [myserver] admin: Admin HTTP interface started on port 9900.\r\nJan 22 19:43:35 app01.sea01.staging.abc [myserver] http: Starting service\r\n```\r\n\r\nHowever, a stacktrace looks pretty bad (notice that the \"&lt;11&gt;timestamp host...\" prefix is repeated several times):\r\n```\r\nJan 22 19:45:01 app01.sea01.staging.abc [myserver] stats: Error occurred recording stats<11>2014-01-22T19:45:01 app01.sea01.staging.abc [myserver] stats: com.abc.app.managers.DatabaseNotFoundException: Database with key 99229cd4e78a98357107814cc60 does not exist<11>2014-01-22T19:45:01 app01.sea01.staging.abc [myserver] stats:     at com.abc.app.managers.DatabaseManager$$anonfun$getByKey$1.apply(DatabaseManager.scala:48)<11>2014-01-22T19:45:01 app01.sea01.staging.abc [myserver] stats:     at com.abc.app.managers.DatabaseManager$$anonfun$getByKey$1.apply(DatabaseManager.scala:44)<11>2014-01-22T19:45:01 app01.sea01.staging.abc [myserver] stats:     at com.twitter.util.Try$.apply(Try.scala:13)<11>2014-01-22T19:45:01 app01.sea01.staging.abc [myserver] stats:     at com.twitter.util.ExecutorServiceFuturePool$$anon$2.run(FuturePool.scala:75)<11>2014-01-22T19:45:01 app01.sea01.staging.abc [myserver] stats:     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)<11>2014-01-22T19:45:01 app01.sea01.staging.abc [myserver] stats:     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)<11>2014-01-22T19:45:01 app01.sea01.staging.abc [myserver] stats:     at java.util.concurrent.FutureTask.run(FutureTask.java:166)<11>2014-01-22T19:45:01 app01.sea01.staging.abc [myserver] stats:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)<11>2014-01-22T19:45:01 app01.sea01.staging.abc [myserver] stats:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)<11>2014-01-22T19:45:01 app01.sea01.staging.abc [myserver] stats:     at java.lang.Thread.run(Thread.java:701)<11>2014-01-22T19:45:01 app01.sea01.staging.abc [myserver] stats:     at com.abc.util.concurrent.ErrorLoggedThread.run(NamedThreadFactory.scala:25)\r\n```\r\n\r\nEDIT - code blocks to show &lt;11&gt;'s and spacing"},"comment":{"url":"https://api.github.com/repos/twitter/util/issues/comments/221276621","html_url":"https://github.com/twitter/util/issues/82#issuecomment-221276621","issue_url":"https://api.github.com/repos/twitter/util/issues/82","id":221276621,"user":{"login":"mosesn","id":156562,"avatar_url":"https://avatars.githubusercontent.com/u/156562?v=3","gravatar_id":"","url":"https://api.github.com/users/mosesn","html_url":"https://github.com/mosesn","followers_url":"https://api.github.com/users/mosesn/followers","following_url":"https://api.github.com/users/mosesn/following{/other_user}","gists_url":"https://api.github.com/users/mosesn/gists{/gist_id}","starred_url":"https://api.github.com/users/mosesn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mosesn/subscriptions","organizations_url":"https://api.github.com/users/mosesn/orgs","repos_url":"https://api.github.com/users/mosesn/repos","events_url":"https://api.github.com/users/mosesn/events{/privacy}","received_events_url":"https://api.github.com/users/mosesn/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T13:52:49Z","updated_at":"2016-05-24T13:52:49Z","body":"@plainlystated I don't think we have made progress on either of these in over two years (!) so my guess is that this is no longer a problem for you.  I'm going to close this for now, but if someone has other feels about SyslogFormatter, please feel free to reopen!"}}
{"actor":{"display_login":"mosesn"}}