Reputation: 272
There is a mention in the docs of using the logging package to create a proper logger service. Given the features in the logging package it would be nice to be able to get the angular component tree as the logger full name.
I tried to play a bit with the dependency injection system to get the injector tree, so that I could reconstruct the app structure for the loggers. But this proved to be too tricky.
Is there a way to do this, or alternatively, is there a canonical logger service that I could use? It seems to be a pretty basic feature so it must be available somewhere.
Upvotes: 4
Views: 420
Reputation: 6171
I'd look at the logging package for help here.
This is not Angular-specific, but it supports tested loggers.
Upvotes: 1