From ebed8ac6502b85c269b4ed82b708e18f1c3b42db Mon Sep 17 00:00:00 2001 From: Yevhen Vydolob Date: Mon, 19 Jul 2021 11:56:17 +0300 Subject: [PATCH] Do not send 'null' in to telemetry Signed-off-by: Yevhen Vydolob --- src/server.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/server.ts b/src/server.ts index 9e9c2cf8..4b705050 100755 --- a/src/server.ts +++ b/src/server.ts @@ -27,15 +27,12 @@ if (process.argv.indexOf('--stdio') === -1) { console.log = connection.console.log.bind(connection.console); console.error = connection.console.error.bind(connection.console); -// temporary, if some code call console.log(null), we log trace to find the place where it was called +//vscode-nls calls console.error(null) in some cases, so we put that in info, to predict sending "null" in to telemetry console.error = (arg) => { - connection.console.error(arg); if (arg === null) { - try { - throw new Error(); - } catch (err) { - connection.console.error(err.stack); - } + connection.console.info(arg); + } else { + connection.console.error(arg); } };