mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-04-17 18:18:11 +00:00
append stacktraces to winston
This commit is contained in:
parent
89db7a9d45
commit
cec1a3d585
2 changed files with 6 additions and 0 deletions
|
@ -34,6 +34,9 @@ class Logger {
|
|||
return logger.info.apply(logger, arguments);
|
||||
};
|
||||
console.error = function () {
|
||||
if (arguments.length > 0 && arguments[0] instanceof Error) {
|
||||
return logger.error(arguments[0].stack);
|
||||
}
|
||||
return logger.error.apply(logger, arguments);
|
||||
};
|
||||
console.info = function () {
|
||||
|
|
|
@ -32,6 +32,9 @@ class Logger {
|
|||
return logger.info.apply(logger, arguments);
|
||||
};
|
||||
console.error = function () {
|
||||
if (arguments.length > 0 && arguments[0] instanceof Error) {
|
||||
return logger.error(arguments[0].stack);
|
||||
}
|
||||
return logger.error.apply(logger, arguments);
|
||||
};
|
||||
console.info = function () {
|
||||
|
|
Loading…
Add table
Reference in a new issue