{"action":"opened","issue":{"url":"https://api.github.com/repos/akka/akka-http/issues/1622","repository_url":"https://api.github.com/repos/akka/akka-http","labels_url":"https://api.github.com/repos/akka/akka-http/issues/1622/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka-http/issues/1622/comments","events_url":"https://api.github.com/repos/akka/akka-http/issues/1622/events","html_url":"https://github.com/akka/akka-http/issues/1622","id":281983500,"number":1622,"title":"Don't log warnings about unsupported methods","user":{"login":"jroper","id":105833,"avatar_url":"https://avatars0.githubusercontent.com/u/105833?v=4","gravatar_id":"","url":"https://api.github.com/users/jroper","html_url":"https://github.com/jroper","followers_url":"https://api.github.com/users/jroper/followers","following_url":"https://api.github.com/users/jroper/following{/other_user}","gists_url":"https://api.github.com/users/jroper/gists{/gist_id}","starred_url":"https://api.github.com/users/jroper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jroper/subscriptions","organizations_url":"https://api.github.com/users/jroper/orgs","repos_url":"https://api.github.com/users/jroper/repos","events_url":"https://api.github.com/users/jroper/events{/privacy}","received_events_url":"https://api.github.com/users/jroper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-14T05:09:31Z","updated_at":"2017-12-14T05:09:31Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"If I make a request to an Akka HTTP server with an unsupported method, I get this:\r\n\r\n```\r\n$ curl http://localhost:9000 -X REMOTE -D -\r\nHTTP/1.1 501 Not Implemented\r\nDate: Thu, 14 Dec 2017 05:01:53 GMT\r\nConnection: close\r\nContent-Type: text/plain; charset=UTF-8\r\nContent-Length: 23\r\n\r\nUnsupported HTTP method\r\n```\r\n\r\nAs you can see, that contains everything I need to know about the error. As the client, it's my responsibility to use only methods that the server understands, so that error only concerns me. So it therefore doesn't make sense for the server to also log an error, because it's not the servers problem, and there's nothing the server can do about it.\r\n\r\nI run an internet facing website, and so far this month, almost 50% of my logs have been polluted by Akka HTTP logging a warning about unsupported methods:\r\n\r\nhttps://gist.github.com/jroper/e466351520c28b44cb402b9c95c1ffe9\r\n\r\nGenerally, these requests come from bots scanning for vulnerable systems - they are beyond my control, and part of the ambient noise that all internet facing HTTP servers see. For Akka HTTP to tell the client what the problem is and log it as a warning is like catching an exception, logging it, and rethrowing it - it's an anti pattern.\r\n\r\nThese logs should be at debug level by default, or at very least, configurable to be logged at debug level, but I do think that since adequate feedback is provided to the client, the default should be debug."}}
{"actor":{"display_login":"jroper"}}