I'm using in my code the angularJS service for logging ($log.error(), $log.debug(), $log.info(), etc) and it works fine.
Now, I'm trying to disable all the logs. I already tried this:
var app = angular.module('app', []);
app.config(
['$logProvider',
function ($logProvider) {
$logProvider.debugEnabled(false);
}]
);
But this does nothing, the logs continues to show...
What is the best way to disable all the angularJS logs that I put in my code?
EDIT:
I'm calling the logs like this:
(function () {
app.controller('MyController', ['$log',
function($log) {
this.testFunction = function() {
$log.debug("debug");
$log.info("info");
$log.error("error");
};
}])
})();