From a35b3a343e2e3f97b107e0c3f158d89ace7cd3ad Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 13 Mar 2025 11:52:07 +0530 Subject: [PATCH] fix: logs format --- .../dashboard/store/modules/conversations/index.js | 14 ++------------ .../shared/helpers/BaseActionCableConnector.js | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/app/javascript/dashboard/store/modules/conversations/index.js b/app/javascript/dashboard/store/modules/conversations/index.js index 4cafd8c46..760edf83b 100644 --- a/app/javascript/dashboard/store/modules/conversations/index.js +++ b/app/javascript/dashboard/store/modules/conversations/index.js @@ -230,12 +230,7 @@ export const mutations = { }); window.logrelic( - `conversation update mismatch with incoming ${conversation} and stored ${selectedConversation}`, - { - customAttributes: { - conversation_id: conversation.id, - }, - } + `conversation update mismatch for ${conversation.id} with incoming ${JSON.stringify(conversation, null, 2)} and stored ${JSON.stringify(selectedConversation, null, 2)}` ); return; @@ -256,12 +251,7 @@ export const mutations = { }); window.logrelic( - `conversation update overlap with incoming ${conversation} and stored ${selectedConversation}`, - { - customAttributes: { - conversation_id: conversation.id, - }, - } + `conversation update overlap for ${conversation.id} with incoming ${JSON.stringify(conversation, null, 2)} and stored ${JSON.stringify(selectedConversation, null, 2)}` ); } diff --git a/app/javascript/shared/helpers/BaseActionCableConnector.js b/app/javascript/shared/helpers/BaseActionCableConnector.js index 131e351b3..f39835095 100644 --- a/app/javascript/shared/helpers/BaseActionCableConnector.js +++ b/app/javascript/shared/helpers/BaseActionCableConnector.js @@ -83,7 +83,7 @@ class BaseActionCableConnector { if (this.isAValidEvent(data)) { if (this.events[event] && typeof this.events[event] === 'function') { window.logrelic( - `processing actioncable ${event} with ${data} at ${Number(Date.now())}` + `processing actioncable ${event} with ${JSON.stringify(data, null, 2)} at ${Number(Date.now())}` ); this.events[event](data); }