I use the angularJS service in my code for logging ($ log.error (), $ log.debug (), $ log.info (), etc.) and it works fine.
Now I am trying to disable all logs. I already tried this:
var app = angular.module('app', []); app.config( ['$logProvider', function ($logProvider) { $logProvider.debugEnabled(false); }] );
But it does nothing, magazines keep showing ...
What is the best way to disable all angularJS logs that I entered in my code?
EDIT:
I call the logs as follows:
(function () { app.controller('MyController', ['$log', function($log) { this.testFunction = function() { $log.debug("debug"); $log.info("info"); $log.error("error"); }; }]) })();
source share