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

Logging capability #40

Closed
ghost opened this issue Jul 3, 2012 · 8 comments
Closed

Logging capability #40

ghost opened this issue Jul 3, 2012 · 8 comments

Comments

@ghost
Copy link

ghost commented Jul 3, 2012

Hi,

I think it would be very nice if we can see what module publish/listens what events. Since Aura uses facade in between module and mediator, I think it is possible to make this happen.

I know that we can simply open each js files then check source codes, but it's just painful, especially working in a team environment with a lot of modules.

I've been using my own mediator in the following way.

Mediator.getOwnerOf("event name"); // returns owner of the event
Mediator.getListenersOf("event name") // returns listeners (modules) who listerns $eventanem
Mediator.getEventMapOf("module") // returns what $module listens and publishes.

Is there a plan for such feature?

@dustinboston
Copy link
Contributor

@KMK1986 Hadn't thought about this but I dig it. Do you want to send a pull request so we can have a look at the code?

@ghost
Copy link
Author

ghost commented Jul 4, 2012

@dustinboston // i will try tonight or whenever I get time. I think I need to learn how to send a pull request first :)

Thank you for the quick reply!

@addyosmani
Copy link
Member

@KMK1986 Pull requests are relatively straight-forward even if they seem a bit of a challenge at first :) Once you've made a fork of this repo on GitHub (which you can do by navigating to the main repo page and clicking 'fork') you'll get your own copy of the project. You can then clone that repo locally using git clone <repo URL>, make your changes, commit them and then push back to GitHub. Once thats done, go to the repo page for your fork of the project and click on the button that says Pull Request. You should be able to make a PR from there :)

If you need any help this might help https://help.github.com/articles/using-pull-requests

@ghost
Copy link
Author

ghost commented Jul 9, 2012

@addyosmani // Thank you for the info! I will try to do it soon.

@ghost
Copy link
Author

ghost commented Jul 13, 2012

Hello,

Sorry for the delay. Been really busy..

I actually created a test page on a repo.

https://github.com/kmk1986/test.git

you need open it with chrome then open inspector. Click each links one by one. You will see something like "["Module1: published event hello to Module2 with event data ", "module1"]"

I think you will get the idea once you open the page..

Please don't look at js files :) it's just proof of concepts.

@addyosmani
Copy link
Member

On this, I think if it were implemented as an extension I wouldn't mind us including it as an optional component, but otherwise it might get closed as patchwelcome. Thoughts @KMK1986?

@ghost
Copy link
Author

ghost commented Aug 11, 2012

@addyosmani // Yes, sure! I started using Backbone Aura for my projects recently. Once I get familiar with it, I will try to create an extension. Thank you for your opinion!

@addyosmani
Copy link
Member

Thanks for the discussion! Closing due to age of ticket and applicability to the refactor. Please feel free to reopen if you would like to address this via a pull request or specific solution with the current version in master.

btw, logging is being added via a recent PR.

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