{"action":"opened","issue":{"url":"https://api.github.com/repos/go-kit/kit/issues/269","repository_url":"https://api.github.com/repos/go-kit/kit","labels_url":"https://api.github.com/repos/go-kit/kit/issues/269/labels{/name}","comments_url":"https://api.github.com/repos/go-kit/kit/issues/269/comments","events_url":"https://api.github.com/repos/go-kit/kit/issues/269/events","html_url":"https://github.com/go-kit/kit/issues/269","id":155690589,"number":269,"title":"kit/log/levels: support filtering","user":{"login":"AlmogBaku","id":98982,"avatar_url":"https://avatars.githubusercontent.com/u/98982?v=3","gravatar_id":"","url":"https://api.github.com/users/AlmogBaku","html_url":"https://github.com/AlmogBaku","followers_url":"https://api.github.com/users/AlmogBaku/followers","following_url":"https://api.github.com/users/AlmogBaku/following{/other_user}","gists_url":"https://api.github.com/users/AlmogBaku/gists{/gist_id}","starred_url":"https://api.github.com/users/AlmogBaku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlmogBaku/subscriptions","organizations_url":"https://api.github.com/users/AlmogBaku/orgs","repos_url":"https://api.github.com/users/AlmogBaku/repos","events_url":"https://api.github.com/users/AlmogBaku/events{/privacy}","received_events_url":"https://api.github.com/users/AlmogBaku/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-19T09:21:42Z","updated_at":"2016-05-19T09:21:42Z","closed_at":null,"body":"### Intro \r\nI believe for some scenarios it's a good practice to \"throw\" a lot of logs(i.e. debugging/info), and in case of need to \"expose them\" in order to track of bugs.\r\n\r\nHowever, you doesn't necessary want to send all those bugs to the \"external\" logs management(i.e. debug a single connection details, especially for real-time use cases). Mechanism of filtering by log-levels can be very useful for this scenarios.\r\n\r\n### Suggestion\r\nAdding \"just a layer of filtering\" to the current structure is feasible, however- it will be based on string comparisons instead of mathematical comparisons (from DEBUG logs and above)\r\n\r\nIn order to achieve a verbosity level, I suggest to use a new type `type LogLevel int`, and to compare base on it.\r\nExample: https://gist.github.com/AlmogBaku/61f183350e10173377f85ee940a84741\r\n\r\n\r\nIf it make sense, i'd love to work on a PR to the existing kit/log/levels API, that contains this enhancement."}}