{"action":"created","issue":{"url":"https://api.github.com/repos/rocketjob/semantic_logger/issues/28","repository_url":"https://api.github.com/repos/rocketjob/semantic_logger","labels_url":"https://api.github.com/repos/rocketjob/semantic_logger/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/rocketjob/semantic_logger/issues/28/comments","events_url":"https://api.github.com/repos/rocketjob/semantic_logger/issues/28/events","html_url":"https://github.com/rocketjob/semantic_logger/issues/28","id":160721779,"number":28,"title":"Logger returns .level as a Fixnum, not Symbol","user":{"login":"ojab","id":153388,"avatar_url":"https://avatars.githubusercontent.com/u/153388?v=3","gravatar_id":"","url":"https://api.github.com/users/ojab","html_url":"https://github.com/ojab","followers_url":"https://api.github.com/users/ojab/followers","following_url":"https://api.github.com/users/ojab/following{/other_user}","gists_url":"https://api.github.com/users/ojab/gists{/gist_id}","starred_url":"https://api.github.com/users/ojab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ojab/subscriptions","organizations_url":"https://api.github.com/users/ojab/orgs","repos_url":"https://api.github.com/users/ojab/repos","events_url":"https://api.github.com/users/ojab/events{/privacy}","received_events_url":"https://api.github.com/users/ojab/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-16T17:54:32Z","updated_at":"2016-06-16T20:43:21Z","closed_at":null,"body":"SemanticLogger returns .level as a Symbol, while Logger returns it as a Fixnum:\r\n```ruby\r\n2.3.0 :003 > Logger.new(STDOUT).level\r\n => 0\r\n2.3.0 :004 > SemanticLogger['MyClass'].level\r\n => :info\r\n```\r\nwhich makes SemanticLogger not so drop-in replacement, see https://github.com/typhoeus/ethon/pull/127"},"comment":{"url":"https://api.github.com/repos/rocketjob/semantic_logger/issues/comments/226607894","html_url":"https://github.com/rocketjob/semantic_logger/issues/28#issuecomment-226607894","issue_url":"https://api.github.com/repos/rocketjob/semantic_logger/issues/28","id":226607894,"user":{"login":"ojab","id":153388,"avatar_url":"https://avatars.githubusercontent.com/u/153388?v=3","gravatar_id":"","url":"https://api.github.com/users/ojab","html_url":"https://github.com/ojab","followers_url":"https://api.github.com/users/ojab/followers","following_url":"https://api.github.com/users/ojab/following{/other_user}","gists_url":"https://api.github.com/users/ojab/gists{/gist_id}","starred_url":"https://api.github.com/users/ojab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ojab/subscriptions","organizations_url":"https://api.github.com/users/ojab/orgs","repos_url":"https://api.github.com/users/ojab/repos","events_url":"https://api.github.com/users/ojab/events{/privacy}","received_events_url":"https://api.github.com/users/ojab/received_events","type":"User","site_admin":false},"created_at":"2016-06-16T20:43:21Z","updated_at":"2016-06-16T20:43:21Z","body":"Yeah, using `.debug?` is the better way, but `level.zero?` or `level == Logger::WARN` also works fine with Logger.\r\nAFAICS there is direct mapping between Logger & SemanticLogger levels :debug, :info, :warn, :error & :fatal, so there is a reasonable expectation that 'Drop-in Replacement' will return `.level` in the same format that Logger does.\r\n\r\nSo I'm absolutely not defending checks that use `.level` comparison, but without fixing this issue `Drop-in Replacement` declaration is inaccurate and should be more like `Drop-in Replacement (with caveats)`."}}
{"actor":{"display_login":"ojab"}}