Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change autoload functionality #1425

Open
asmagill opened this issue May 15, 2017 · 5 comments
Open

Change autoload functionality #1425

asmagill opened this issue May 15, 2017 · 5 comments

Comments

@asmagill
Copy link
Member

Per a variety of discussions, I am entering this as a new issue so it can be tracked/addressed directly:

It has been proposed:

  • Remove the ability to disable autoloading of modules. This has always been an undocumented feature and untested in quite some time. At present it is known that at least one one scenario of requiring hs.window, hs.application, and hs.uielement will fail to load properly without autoloading.

  • move autoloading console messages into hs.logger

  • examine other uses of print for status in core modules and move these into hs.logger as well.

Have I stated the intention correctly?

@cmsj
Copy link
Member

cmsj commented May 15, 2017

seems like an accurate description to me, and I am +1 for all of these things :)

@asmagill
Copy link
Member Author

asmagill commented Jul 1, 2017

@cmsj, should the print statements in setup.lua be handled through the default logger instance or should using the use of hs.logger only start when hs._coresetup is loaded?

@cmsj
Copy link
Member

cmsj commented Sep 15, 2017

@asmagill hmm, I think it might well be a good idea to use hs.logger only after _coresetup is done - better to sacrifice a few lines of logging flexibility than to introduce dependencies to _coresetup imo.

@asmagill
Copy link
Member Author

hs._coresetup already requires logger when it establishes the logging callback delegate currently used by LuaSkin.

This proposal just makes that use universal for any status/debug/detail output generated by Hammerspoon or it's modules so that the user can make a choice as to whether they want to see it or not.

Coupled with the LuaSkin logging changes proposed in #1426, you would be able to select this on a per module basis.

@cmsj
Copy link
Member

cmsj commented Sep 26, 2017

Good point, +1 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants