mirror of
https://github.com/musix-org/musix-oss
synced 2026-11-09 00:06:24 +00:00
fixed error logging of objects
This commit is contained in:
1 parent
60e40029cd
commit
83b56b73a0
2 files changed
+8
-4
No files matched your search
@@ -28,11 +28,13 @@ 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 && arg) webhookClient.send(arg);
|
if (!config.devMode && arg)
|
||||||
|
webhookClient.send(JSON.stringify(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.devMode && arg) webhookClient.send(arg);
|
if (!config.devMode && arg)
|
||||||
|
webhookClient.send(JSON.stringify(arg));
|
||||||
};
|
};
|
||||||
+4
-2
@@ -7,11 +7,13 @@ 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 && arg) webhookClient.send(arg);
|
if (!client.config.devMode && arg)
|
||||||
|
webhookClient.send(JSON.stringify(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 && arg) webhookClient.send(arg);
|
if (!client.config.devMode && arg)
|
||||||
|
webhookClient.send(JSON.stringify(arg));
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user