From 13b34ca0bec72c3be649de97a2a860ba8e3f8073 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 11 May 2020 14:03:59 +0200 Subject: Log trace when deprecated globals are used Signed-off-by: Christoph Wurst Signed-off-by: npmbuildbot[bot] --- core/src/globals.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'core/src') diff --git a/core/src/globals.js b/core/src/globals.js index e7f2b075374..a55392f3a74 100644 --- a/core/src/globals.js +++ b/core/src/globals.js @@ -53,11 +53,16 @@ import 'strengthify/strengthify.css' import OC from './OC/index' import OCP from './OCP/index' import OCA from './OCA/index' +import { debug } from './OC/debug' import escapeHTML from 'escape-html' import { getToken as getRequestToken } from './OC/requesttoken' const warnIfNotTesting = function() { - if (window.TESTING === undefined) { + const notTesting = window.TESTING === undefined + if (notTesting && debug) { + /* eslint-disable no-console */ + console.trace.apply(console, arguments) + } else if (notTesting) { console.warn.apply(console, arguments) } } -- cgit v1.2.3