-
Notifications
You must be signed in to change notification settings - Fork 121
Have enabling/disabling debugging not require restarting Atom #361
base: master
Are you sure you want to change the base?
Conversation
39df273
to
88ad30b
Compare
@sadick254 would you be willing to look at this and see if it works with what you were trying to implement with your item? Thank you. |
@sadick254 related to this, I have a question. According to #356, "It should not be loaded in the production code" means it won't ever load in the release? If that is the case, then I might need to come up with an alternative since I added |
Thank You Back dont help me more for the moment please. |
@dmoonfire I now have this on my radar. I will look into it. Thanks for your contribution. 👍 |
88ad30b
to
1a7d2cc
Compare
@sadick254, I've just looked at this again and I believe it will solve the problem with #372 in a more generic manner (there is a missing If you don't see any problems, I think it would solve a problem a number of people have had, but I'm not sure what's happened. I can also merge it myself, but I typically request one other person review it before I do that (never trust one's own code). |
This also would fix #369. |
@dmoonfire. Thanks for opening a PR. I will take a look into it. |
Requirements
Description of the Change
When the debug function is disabled, it create a
() => {}
function to swallow logging. However, if the debug flag is switched on, the saved log properties retain the empty function and don't start logging until Atom is restarted.Likewise, when the debugging is disabled keeps the debug versions of the code and they continue to operate.
In addition,
localStorage.debug
needed to be set for debugging to work. Since we have a configuration values, the change inserts the required local storage keys for useful debug operations.Alternate Designs
Using the current implementation works, it just requires extra steps.
Benefits
Enabling and disabling debug should control the logging immediately, this makes it a less effort and easier to work with.
Possible Drawbacks
The handle the wrapped version of the logger requires extra complexity. There might be some edge cases and it will have a small impact on startup time to load the additional module.
Applicable Issues