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

Enhancement: register a function to every signal #77

Closed
premek opened this issue Feb 5, 2017 · 1 comment
Closed

Enhancement: register a function to every signal #77

premek opened this issue Feb 5, 2017 · 1 comment

Comments

@premek
Copy link

premek commented Feb 5, 2017

I'd like to be able to register a function that will be called with every 'emit'. I'd use that to call 'print' with every signal to have a log of events. e.g:

Signal.register(function(...) print("signal emmited", ...) end)
@palmettos
Copy link
Contributor

palmettos commented Feb 5, 2017

I thought this was a good idea so I created a pull request here: #78

With this feature you would do:

signal.registerPattern('.*', function(...) print('signal emitted', ...) end)

@vrld vrld closed this as completed in 22d0fb6 Mar 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants