{"action":"created","issue":{"url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/249","labels_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/249/labels{/name}","comments_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/249/comments","events_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/249/events","html_url":"https://github.com/CartoDB/CartoDB-SQL-API/pull/249","id":104866119,"number":249,"title":"Adds a custom log4js format function to log sql query from POST requests","user":{"login":"rochoa","id":45346,"avatar_url":"https://avatars.githubusercontent.com/u/45346?v=3","gravatar_id":"","url":"https://api.github.com/users/rochoa","html_url":"https://github.com/rochoa","followers_url":"https://api.github.com/users/rochoa/followers","following_url":"https://api.github.com/users/rochoa/following{/other_user}","gists_url":"https://api.github.com/users/rochoa/gists{/gist_id}","starred_url":"https://api.github.com/users/rochoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rochoa/subscriptions","organizations_url":"https://api.github.com/users/rochoa/orgs","repos_url":"https://api.github.com/users/rochoa/repos","events_url":"https://api.github.com/users/rochoa/events{/privacy}","received_events_url":"https://api.github.com/users/rochoa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/labels/enhancement","name":"enhancement","color":"bfe5bf"}],"state":"open","locked":false,"assignee":{"login":"rochoa","id":45346,"avatar_url":"https://avatars.githubusercontent.com/u/45346?v=3","gravatar_id":"","url":"https://api.github.com/users/rochoa","html_url":"https://github.com/rochoa","followers_url":"https://api.github.com/users/rochoa/followers","following_url":"https://api.github.com/users/rochoa/following{/other_user}","gists_url":"https://api.github.com/users/rochoa/gists{/gist_id}","starred_url":"https://api.github.com/users/rochoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rochoa/subscriptions","organizations_url":"https://api.github.com/users/rochoa/orgs","repos_url":"https://api.github.com/users/rochoa/repos","events_url":"https://api.github.com/users/rochoa/events{/privacy}","received_events_url":"https://api.github.com/users/rochoa/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/milestones/30","html_url":"https://github.com/CartoDB/CartoDB-SQL-API/milestones/Torrelodones","labels_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/milestones/30/labels","id":1281769,"number":30,"title":"Torrelodones","description":"","creator":{"login":"rochoa","id":45346,"avatar_url":"https://avatars.githubusercontent.com/u/45346?v=3","gravatar_id":"","url":"https://api.github.com/users/rochoa","html_url":"https://github.com/rochoa","followers_url":"https://api.github.com/users/rochoa/followers","following_url":"https://api.github.com/users/rochoa/following{/other_user}","gists_url":"https://api.github.com/users/rochoa/gists{/gist_id}","starred_url":"https://api.github.com/users/rochoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rochoa/subscriptions","organizations_url":"https://api.github.com/users/rochoa/orgs","repos_url":"https://api.github.com/users/rochoa/repos","events_url":"https://api.github.com/users/rochoa/events{/privacy}","received_events_url":"https://api.github.com/users/rochoa/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":1,"state":"open","created_at":"2015-08-31T13:06:02Z","updated_at":"2015-09-04T10:34:49Z","due_on":"2015-09-16T22:00:00Z","closed_at":null},"comments":2,"created_at":"2015-09-04T10:34:49Z","updated_at":"2015-09-04T13:37:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/249","html_url":"https://github.com/CartoDB/CartoDB-SQL-API/pull/249","diff_url":"https://github.com/CartoDB/CartoDB-SQL-API/pull/249.diff","patch_url":"https://github.com/CartoDB/CartoDB-SQL-API/pull/249.patch"},"body":"Tokens in log4js are not provided with request/response for context, using a custom format function allow to access them.\r\n\r\nIn the case of express logger token functions receive request/response for context so it uses a custom token.\r\n\r\n`SQL_QUERY_BODY_LOG_MAX_LENGTH = 2000` might seem a bit arbitrary but it tries to match which is considered a sane max length for a GET query string. That means that we won't log more than we might log during a GET request with a lengthy query string.\r\n\r\nCloses #206"},"comment":{"url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/comments/137740076","html_url":"https://github.com/CartoDB/CartoDB-SQL-API/pull/249#issuecomment-137740076","issue_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/249","id":137740076,"user":{"login":"luisbosque","id":93268,"avatar_url":"https://avatars.githubusercontent.com/u/93268?v=3","gravatar_id":"","url":"https://api.github.com/users/luisbosque","html_url":"https://github.com/luisbosque","followers_url":"https://api.github.com/users/luisbosque/followers","following_url":"https://api.github.com/users/luisbosque/following{/other_user}","gists_url":"https://api.github.com/users/luisbosque/gists{/gist_id}","starred_url":"https://api.github.com/users/luisbosque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luisbosque/subscriptions","organizations_url":"https://api.github.com/users/luisbosque/orgs","repos_url":"https://api.github.com/users/luisbosque/repos","events_url":"https://api.github.com/users/luisbosque/events{/privacy}","received_events_url":"https://api.github.com/users/luisbosque/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T13:37:46Z","updated_at":"2015-09-04T13:37:46Z","body":":+1: "}}