{"action":"closed","issue":{"url":"https://api.github.com/repos/azer/logger/issues/3","repository_url":"https://api.github.com/repos/azer/logger","labels_url":"https://api.github.com/repos/azer/logger/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/azer/logger/issues/3/comments","events_url":"https://api.github.com/repos/azer/logger/issues/3/events","html_url":"https://github.com/azer/logger/issues/3","id":127936475,"number":3,"title":"Public access to `enabled` map","user":{"login":"cathalgarvey","id":1167837,"avatar_url":"https://avatars.githubusercontent.com/u/1167837?v=3","gravatar_id":"","url":"https://api.github.com/users/cathalgarvey","html_url":"https://github.com/cathalgarvey","followers_url":"https://api.github.com/users/cathalgarvey/followers","following_url":"https://api.github.com/users/cathalgarvey/following{/other_user}","gists_url":"https://api.github.com/users/cathalgarvey/gists{/gist_id}","starred_url":"https://api.github.com/users/cathalgarvey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cathalgarvey/subscriptions","organizations_url":"https://api.github.com/users/cathalgarvey/orgs","repos_url":"https://api.github.com/users/cathalgarvey/repos","events_url":"https://api.github.com/users/cathalgarvey/events{/privacy}","received_events_url":"https://api.github.com/users/cathalgarvey/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-21T14:32:44Z","updated_at":"2016-02-23T19:45:12Z","closed_at":"2016-02-23T19:45:12Z","body":"Hey, this logger looks great- a good blend of simple API, levelling/app-segregation, and nice design.\r\n\r\nOne feature I'd really like, though, is the ability to programmatically enable logs and log levels, rather than relying on the environment variable method. If I'm already defining a CLI interface for my application I'd prefer to add a \"-v\" / \"-vv\" flag to enable various log levels or log types.\r\n\r\nIt looks like this would be easy to do if the \"enabled\" map were exposed publicly. Alternatively, if a setter function were added to complement `IsEnabled`, so you could call a function with a logger name and a state to enable. Something like `SetEnabled(logname string, setstate bool) error`.\r\n\r\nI can write it up and PR, if you like?"}}