diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index 7b6f13293b..492422e453 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -392,6 +392,20 @@ angular.module('Tower', [ }); } ]) + + .config(function($provide) { + $provide.decorator('$log', function($delegate) { + var _debug = $delegate.debug; + $delegate.debug = function(msg) { + // only show debug messages when debug_mode set to true in config + if ($AnsibleConfig.debug_mode) { + _debug(msg); + } + } + return $delegate; + }); + }) + .run(['$compile', '$cookieStore', '$rootScope', '$log', 'CheckLicense', '$location', 'Authorization', 'LoadBasePaths', 'ViewLicense', 'Timer', 'ClearScope', 'HideStream', 'Socket', function ($compile, $cookieStore, $rootScope, $log, CheckLicense, $location, Authorization, LoadBasePaths, ViewLicense, diff --git a/awx/ui/static/js/config.js b/awx/ui/static/js/config.js index 9864881116..66255cf4da 100644 --- a/awx/ui/static/js/config.js +++ b/awx/ui/static/js/config.js @@ -14,7 +14,7 @@ var $AnsibleConfig = { tooltip_delay: {show: 500, hide: 100}, // Default number of milliseconds to delay displaying/hiding tooltips - debug_mode: true, // Enable console logging messages + debug_mode: false, // Enable console logging messages password_strength: 45, // User password strength. Integer between 0 and 100, 100 being impossibly strong. // This value controls progress bar colors: