4

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.

2

1 Answer 1

1

I'd look at the logging package for help here.

This is not Angular-specific, but it supports tested loggers.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.