{"action":"created","issue":{"url":"https://api.github.com/repos/influxdata/influxdb/issues/6812","repository_url":"https://api.github.com/repos/influxdata/influxdb","labels_url":"https://api.github.com/repos/influxdata/influxdb/issues/6812/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/influxdb/issues/6812/comments","events_url":"https://api.github.com/repos/influxdata/influxdb/issues/6812/events","html_url":"https://github.com/influxdata/influxdb/pull/6812","id":159227391,"number":6812,"title":"Make httpd logger closer to Common Log Format","user":{"login":"sparrc","id":7155926,"avatar_url":"https://avatars.githubusercontent.com/u/7155926?v=3","gravatar_id":"","url":"https://api.github.com/users/sparrc","html_url":"https://github.com/sparrc","followers_url":"https://api.github.com/users/sparrc/followers","following_url":"https://api.github.com/users/sparrc/following{/other_user}","gists_url":"https://api.github.com/users/sparrc/gists{/gist_id}","starred_url":"https://api.github.com/users/sparrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparrc/subscriptions","organizations_url":"https://api.github.com/users/sparrc/orgs","repos_url":"https://api.github.com/users/sparrc/repos","events_url":"https://api.github.com/users/sparrc/events{/privacy}","received_events_url":"https://api.github.com/users/sparrc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-08T17:33:59Z","updated_at":"2016-06-08T21:59:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/influxdata/influxdb/pulls/6812","html_url":"https://github.com/influxdata/influxdb/pull/6812","diff_url":"https://github.com/influxdata/influxdb/pull/6812.diff","patch_url":"https://github.com/influxdata/influxdb/pull/6812.patch"},"body":"###### Required for all non-trivial PRs\r\n\r\n- [ ] Tests pass\r\n- [ ] CHANGELOG.md updated\r\n\r\nchanges the httpd log lines from this:\r\n\r\n    [httpd] 2016/06/08 14:06:39 ::1 - - [08/Jun/2016:14:06:39 +0100] POST /write?consistency=any&db=telegraf&precision=s&rp= HTTP/1.1 204 0 - InfluxDBClient d6aa01fc-2d79-11e6-8024-000000000000 2.751391ms\r\n\r\nto this:\r\n\r\n    [httpd] ::1 - - [08/Jun/2016:14:06:39 +0100] \"POST /write?consistency=any&db=telegraf&precision=s&rp= HTTP/1.1\" 204 0 - InfluxDBClient d6aa01fc-2d79-11e6-8024-000000000000 2.751391ms\r\n\r\nSo it changes two things:\r\n\r\n1. Remove the logger timestamp at the beginning which isn't very relevant anyways\r\n2. adds quotes around \"METHOD URI PROTOCOL\", which is part of the\r\ncommon log format.\r\n\r\nCompared with CLF, our logs now look like this:\r\n\r\n    [httpd] %{COMBINED_LOG_FORMAT} <response_time>"},"comment":{"url":"https://api.github.com/repos/influxdata/influxdb/issues/comments/224742852","html_url":"https://github.com/influxdata/influxdb/pull/6812#issuecomment-224742852","issue_url":"https://api.github.com/repos/influxdata/influxdb/issues/6812","id":224742852,"user":{"login":"jsternberg","id":1212129,"avatar_url":"https://avatars.githubusercontent.com/u/1212129?v=3","gravatar_id":"","url":"https://api.github.com/users/jsternberg","html_url":"https://github.com/jsternberg","followers_url":"https://api.github.com/users/jsternberg/followers","following_url":"https://api.github.com/users/jsternberg/following{/other_user}","gists_url":"https://api.github.com/users/jsternberg/gists{/gist_id}","starred_url":"https://api.github.com/users/jsternberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsternberg/subscriptions","organizations_url":"https://api.github.com/users/jsternberg/orgs","repos_url":"https://api.github.com/users/jsternberg/repos","events_url":"https://api.github.com/users/jsternberg/events{/privacy}","received_events_url":"https://api.github.com/users/jsternberg/received_events","type":"User","site_admin":false},"created_at":"2016-06-08T21:59:51Z","updated_at":"2016-06-08T21:59:51Z","body":"@sparrc look inside of `services/httpd/service.go`. The `SetLogOutput(io.Writer)` method sets the logger of the handler to the same logger as the service so the initial logger created by the handler never gets used. This happens in a few places and the best way to go about things is just to make sure they agree with each other."}}
{"actor":{"display_login":"jsternberg"}}