mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-16 14:49:48 -06:00
Stringify objects in the details field of logger config
This commit is contained in:
@@ -7,6 +7,10 @@ class Logger {
|
||||
if (message instanceof Object) {
|
||||
message = JSON.stringify(message, null, 2);
|
||||
}
|
||||
|
||||
if (details instanceof Object) {
|
||||
details = JSON.stringify(details, null, 2);
|
||||
}
|
||||
let msg = `${timestamp} ${level}:`;
|
||||
service && (msg += ` [${service}]`);
|
||||
method && (msg += `(${method})`);
|
||||
|
||||
Reference in New Issue
Block a user