1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-10 05:10:17 +00:00

make sure logs have arguments

This commit is contained in:
MatteZ02 2020-06-29 19:09:31 +03:00
parent 6386a672c5
commit 052dfbcfbc
2 changed files with 4 additions and 4 deletions

View File

@ -28,11 +28,11 @@ const oldConsole = {};
oldConsole.log = console.log; oldConsole.log = console.log;
console.log = function (arg) { console.log = function (arg) {
oldConsole.log(arg); oldConsole.log(arg);
if (!config.devMode) webhookClient.send(arg); if (!config.devMode && arg) webhookClient.send(arg);
}; };
oldConsole.error = console.error; oldConsole.error = console.error;
console.error = function (arg) { console.error = function (arg) {
oldConsole.error(arg); oldConsole.error(arg);
if (!client.config.devMode) webhookClient.send(arg); if (!client.devMode && arg) webhookClient.send(arg);
}; };

View File

@ -7,11 +7,11 @@ const oldConsole = {};
oldConsole.log = console.log; oldConsole.log = console.log;
console.log = function (arg) { console.log = function (arg) {
oldConsole.log(arg); oldConsole.log(arg);
if (!client.config.devMode) webhookClient.send(arg); if (!client.config.devMode && arg) webhookClient.send(arg);
}; };
oldConsole.error = console.error; oldConsole.error = console.error;
console.error = function (arg) { console.error = function (arg) {
oldConsole.error(arg); oldConsole.error(arg);
if (!client.config.devMode) webhookClient.send(arg); if (!client.config.devMode && arg) webhookClient.send(arg);
}; };