ember.js icon indicating copy to clipboard operation
ember.js copied to clipboard

A Logging Option For Controller/View/Template Creation

Open Undistraction opened this issue 13 years ago • 4 comments

I am very new to Ember, so apologies if this is well trodden ground, but I've found picking things up has been made much harder by a lack of logging options for the framework. I understand why Ember magically creates Views/Controllers when they are not present, but not being able to see this happen in the logs makes debugging some issues much harder than it needs to be. In the same way I can switch on logging for bindings and routing, I think it would be hugely beneficial to offer logging for Template, View and Controller Creation. Something along the lines of:

Looking for ExampleController ... ExampleControllerFound Looking for ExampleView ... ExampleView Not Found Looking for ExampleTemplate .... Example Template Found Looking for AnotherController ... AnotherController Not Found Generated AnotherController

Perhaps as I dig deeper into Ember I will find other ways to keep my eyes on this, but as someone trying to understand the framework, this definitely would have made my life much easier.

Undistraction avatar Mar 25 '13 16:03 Undistraction

I've been working on something along these lines. Unfortunately, I haven't yet had a chance to get it finished and merged in.

wagenet avatar Mar 27 '13 04:03 wagenet

I believe this functionality is now available using LOG_ACTIVE_GENERATION thanks to @stefanpenner in SHA: dc663dd77214086fc0e1a70b05ba31ba2fc53bda e.g.,

window.App = Ember.Application.create({
  LOG_ACTIVE_GENERATION: true
});

pootsbook avatar Jun 06 '13 21:06 pootsbook

@pootsbook As far as I can see, LOG_ACTIVE_GENERATION doesn't do what @1ndivisible is looking for, at least not in RC6. The only thing I get when I enable that option my app are generated -> route:index statements which aren't very helpful for newcomers.

mjackson avatar Jul 15 '13 23:07 mjackson

@mjijackson would logging both the generated and the hits that are not generated work?

stefanpenner avatar Jul 16 '13 01:07 stefanpenner