mirror of
https://github.com/musix-org/musix-oss
synced 2024-11-10 02:00:20 +00:00
fixed error logging of objects
This commit is contained in:
parent
60e40029cd
commit
83b56b73a0
6
index.js
6
index.js
@ -28,11 +28,13 @@ const oldConsole = {};
|
||||
oldConsole.log = console.log;
|
||||
console.log = function (arg) {
|
||||
oldConsole.log(arg);
|
||||
if (!config.devMode && arg) webhookClient.send(arg);
|
||||
if (!config.devMode && arg)
|
||||
webhookClient.send(JSON.stringify(arg));
|
||||
};
|
||||
|
||||
oldConsole.error = console.error;
|
||||
console.error = function (arg) {
|
||||
oldConsole.error(arg);
|
||||
if (!client.devMode && arg) webhookClient.send(arg);
|
||||
if (!config.devMode && arg)
|
||||
webhookClient.send(JSON.stringify(arg));
|
||||
};
|
@ -7,11 +7,13 @@ const oldConsole = {};
|
||||
oldConsole.log = console.log;
|
||||
console.log = function (arg) {
|
||||
oldConsole.log(arg);
|
||||
if (!client.config.devMode && arg) webhookClient.send(arg);
|
||||
if (!client.config.devMode && arg)
|
||||
webhookClient.send(JSON.stringify(arg));
|
||||
};
|
||||
|
||||
oldConsole.error = console.error;
|
||||
console.error = function (arg) {
|
||||
oldConsole.error(arg);
|
||||
if (!client.config.devMode && arg) webhookClient.send(arg);
|
||||
if (!client.config.devMode && arg)
|
||||
webhookClient.send(JSON.stringify(arg));
|
||||
};
|
Loading…
Reference in New Issue
Block a user