diff --git a/lib/logging/log.js b/lib/logging/log.js index 1ff3892..92d4cda 100644 --- a/lib/logging/log.js +++ b/lib/logging/log.js @@ -24,6 +24,10 @@ function NRlog (msg) { } catch (eee) { jsMsg = { ts: Date.now(), level: '', msg } } + if (!Object.hasOwn(jsMsg, 'ts') && !Object.hasOwn(jsMsg, 'level')) { + // not a NR log message + jsMsg = { ts: Date.now(), level: '', msg } + } const date = new Date(jsMsg.ts) if (typeof jsMsg.msg !== 'string') { jsMsg.msg = JSON.stringify(jsMsg.msg)