Using the $logProvider in IONIC - How to get the current location of the call?


#1

Hello,

I added the $logProvider in my AngularJS app.

 $logProvider.debugEnabled(true);

the problem is when I call it like :

        $log.info('Hello WORLD');
        console.info('Hello WORLD');


Hello WORLD ionic.bundle.min.js:122
Hello WORLD services.js:35

I can’t get the location of the call with the $log, I always have ionic.bundle.min.js:122
With the console.info it’s working properly : services.js:35

How to get the proper location with the $log functionality ?
Thank you.


#2

up - do you have any idea ?
Thank you very much.


#3

Here’s a useful article which should help you out: http://solutionoptimist.com/2013/10/07/enhance-angularjs-logging-using-decorators/