From 3db561141e7900b6f48711c77d74c1370cf13a6e Mon Sep 17 00:00:00 2001 From: Joe Fiorini Date: Thu, 22 Jan 2015 17:47:29 -0500 Subject: [PATCH] Add Debug.log helper for easy logging --- awx/ui/static/js/app.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index 73675b9be2..3c6af0934c 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -10,6 +10,14 @@ var urlPrefix, $AnsibleConfig; +window.Debug = {}; +window.Debug.log = function(label, obj) { + if (Debug.enabled) { + console.log(label + ":", obj); + } + return obj; +}; + if ($basePath) { urlPrefix = $basePath; } else {