{"action":"created","issue":{"url":"https://api.github.com/repos/evgenyrodionov/redux-logger/issues/294","repository_url":"https://api.github.com/repos/evgenyrodionov/redux-logger","labels_url":"https://api.github.com/repos/evgenyrodionov/redux-logger/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/evgenyrodionov/redux-logger/issues/294/comments","events_url":"https://api.github.com/repos/evgenyrodionov/redux-logger/issues/294/events","html_url":"https://github.com/evgenyrodionov/redux-logger/issues/294","id":309718190,"number":294,"title":"expose an action to switch logging off/on","user":{"login":"jonathanadler","id":3277080,"avatar_url":"https://avatars2.githubusercontent.com/u/3277080?v=4","gravatar_id":"","url":"https://api.github.com/users/jonathanadler","html_url":"https://github.com/jonathanadler","followers_url":"https://api.github.com/users/jonathanadler/followers","following_url":"https://api.github.com/users/jonathanadler/following{/other_user}","gists_url":"https://api.github.com/users/jonathanadler/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanadler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanadler/subscriptions","organizations_url":"https://api.github.com/users/jonathanadler/orgs","repos_url":"https://api.github.com/users/jonathanadler/repos","events_url":"https://api.github.com/users/jonathanadler/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanadler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-29T11:27:19Z","updated_at":"2018-04-25T07:57:39Z","closed_at":null,"author_association":"NONE","body":"I wasn't sure this kind of option exists.\r\nI know this would help me a lot while developing.\r\n\r\nI'll give a use case:\r\nAt work we use this library, which is very helpful, and we conditionally add it to our middleware depending on the environment (dev only basically).\r\nThe thing is that most of the time, I don't need it, and I would love to have a way to toggle it off or on.\r\nWhat I do now is remove the line of code, adding the middleware, completely, then forgetting about it, and committing it to the master branch 😕 \r\n\r\nWhat do you guys think?"},"comment":{"url":"https://api.github.com/repos/evgenyrodionov/redux-logger/issues/comments/384195024","html_url":"https://github.com/evgenyrodionov/redux-logger/issues/294#issuecomment-384195024","issue_url":"https://api.github.com/repos/evgenyrodionov/redux-logger/issues/294","id":384195024,"user":{"login":"Rycochet","id":290714,"avatar_url":"https://avatars2.githubusercontent.com/u/290714?v=4","gravatar_id":"","url":"https://api.github.com/users/Rycochet","html_url":"https://github.com/Rycochet","followers_url":"https://api.github.com/users/Rycochet/followers","following_url":"https://api.github.com/users/Rycochet/following{/other_user}","gists_url":"https://api.github.com/users/Rycochet/gists{/gist_id}","starred_url":"https://api.github.com/users/Rycochet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rycochet/subscriptions","organizations_url":"https://api.github.com/users/Rycochet/orgs","repos_url":"https://api.github.com/users/Rycochet/repos","events_url":"https://api.github.com/users/Rycochet/events{/privacy}","received_events_url":"https://api.github.com/users/Rycochet/received_events","type":"User","site_admin":false},"created_at":"2018-04-25T07:57:39Z","updated_at":"2018-04-25T07:57:39Z","author_association":"NONE","body":"You can always do this yourself with a global variable, and the `predicate` option returning that global - then an action to toggle it ;-)\r\n\r\nJust as an option - why not do something on `localStorage`, and then you can toggle it and a simple reload will change it - `localStorage[\"enableLogging\"] = true`, then have `if (localStorage[\"enableLogging\"]) {...createLogger...}`\r\n\r\n... And just about to add that to mine as it makes sense!"}}
{"actor":{"display_login":"Rycochet"}}