code-chunks/angular2-logger

intercept log message before outputting to console

Closed this issue · 2 comments

Hi all,

I was wandering if there a way to intercept a log message before outputting to console ?
I would like to add a data prefix to to each log.

Thanks

@dannyhuly

You can create your own Logger class and extend the one in this library, then you inject yours instead in the configuration.

@langley-agm actually I was looking for some kind of hook to avoid extending ng2 service.
But after locking at the code I realized that there is no support for it.

Thank.