Milan
Milan

Reputation: 272

Logger service using logging package in Angular Dart

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

Answers (1)

Kevin Moore
Kevin Moore

Reputation: 6171

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

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

Upvotes: 1

Related Questions