{"action":"created","issue":{"url":"https://api.github.com/repos/inconshreveable/log15/issues/101","repository_url":"https://api.github.com/repos/inconshreveable/log15","labels_url":"https://api.github.com/repos/inconshreveable/log15/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/inconshreveable/log15/issues/101/comments","events_url":"https://api.github.com/repos/inconshreveable/log15/issues/101/events","html_url":"https://github.com/inconshreveable/log15/pull/101","id":169885385,"number":101,"title":"Add a CustomString type to allow unescaped output.","user":{"login":"kormat","id":6919822,"avatar_url":"https://avatars.githubusercontent.com/u/6919822?v=3","gravatar_id":"","url":"https://api.github.com/users/kormat","html_url":"https://github.com/kormat","followers_url":"https://api.github.com/users/kormat/followers","following_url":"https://api.github.com/users/kormat/following{/other_user}","gists_url":"https://api.github.com/users/kormat/gists{/gist_id}","starred_url":"https://api.github.com/users/kormat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kormat/subscriptions","organizations_url":"https://api.github.com/users/kormat/orgs","repos_url":"https://api.github.com/users/kormat/repos","events_url":"https://api.github.com/users/kormat/events{/privacy}","received_events_url":"https://api.github.com/users/kormat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-08T09:58:36Z","updated_at":"2016-08-08T14:10:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/inconshreveable/log15/pulls/101","html_url":"https://github.com/inconshreveable/log15/pull/101","diff_url":"https://github.com/inconshreveable/log15/pull/101.diff","patch_url":"https://github.com/inconshreveable/log15/pull/101.patch"},"body":"When trying to print multi-line (or otherwise formatted) messages, the\r\nfact that all strings are escaped becomes a problem. For example:\r\n\r\n```\r\nfunc PanicLog() {\r\n    if err := recover(); err != nil {\r\n        log.Crit(\"Panic\", \"stack\", string(debug.Stack()))\r\n    }\r\n}\r\n```\r\nThe stack trace becomes a single line, with all \\n's and \\t's escaped.\r\nWith this new type, the central line becomes:\r\n```\r\nlog.Crit(\"Panic\", \"stack\", log.CustomString(debug.Stack()))\r\n```\r\nand now it formats in a readable way. Any CustomString values are\r\nsurrouneded by triple backticks to it easier to see where they\r\nstart/end. An example output is viewable here:\r\nhttps://gist.github.com/kormat/10e09e4dcfef0115c65fcdc20c98297e"},"comment":{"url":"https://api.github.com/repos/inconshreveable/log15/issues/comments/238249664","html_url":"https://github.com/inconshreveable/log15/pull/101#issuecomment-238249664","issue_url":"https://api.github.com/repos/inconshreveable/log15/issues/101","id":238249664,"user":{"login":"kormat","id":6919822,"avatar_url":"https://avatars.githubusercontent.com/u/6919822?v=3","gravatar_id":"","url":"https://api.github.com/users/kormat","html_url":"https://github.com/kormat","followers_url":"https://api.github.com/users/kormat/followers","following_url":"https://api.github.com/users/kormat/following{/other_user}","gists_url":"https://api.github.com/users/kormat/gists{/gist_id}","starred_url":"https://api.github.com/users/kormat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kormat/subscriptions","organizations_url":"https://api.github.com/users/kormat/orgs","repos_url":"https://api.github.com/users/kormat/repos","events_url":"https://api.github.com/users/kormat/events{/privacy}","received_events_url":"https://api.github.com/users/kormat/received_events","type":"User","site_admin":false},"created_at":"2016-08-08T14:10:35Z","updated_at":"2016-08-08T14:10:35Z","body":"Hmm, k. Looking at kr, i don't see any way to support making multi-line output readable for humans. Assuming that is the case, do you think it would be possible to get it merged anyway, with a warning saying that this won't work for machine parsing? We use multi-line logging a Lot in our code."}}
{"actor":{"display_login":"kormat"}}