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:
parent
6386a672c5
commit
052dfbcfbc
4
index.js
4
index.js
@ -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);
|
||||||
};
|
};
|
@ -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);
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user