From 335e2ca0d5f10d8e596a8ed6e15d7e74eb1cf755 Mon Sep 17 00:00:00 2001 From: Akansha Sakhre Date: Fri, 4 Oct 2024 14:14:35 +0530 Subject: [PATCH 1/5] added logs --- src/config/apolloclient.ts | 2 +- src/config/logs.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/config/apolloclient.ts b/src/config/apolloclient.ts index 4b0540d11..47f22d535 100644 --- a/src/config/apolloclient.ts +++ b/src/config/apolloclient.ts @@ -105,7 +105,7 @@ const gqlClient = (navigate: any) => { // @ts-ignore switch (networkError.statusCode) { case 401: - setLogs(`Error 401: logging user out`, 'error'); + setLogs(`Error 401: logging user out, ${JSON.stringify(networkError)}`, 'error'); navigate('/logout/session'); break; default: diff --git a/src/config/logs.ts b/src/config/logs.ts index e53820735..4f0106e55 100644 --- a/src/config/logs.ts +++ b/src/config/logs.ts @@ -1,8 +1,12 @@ import pino from 'pino'; import { createPinoBrowserSend, createWriteStream } from 'pino-logflare'; import { LOGFLARE_API, LOGFLARE_SOURCE } from '.'; +import { getUserSession } from 'services/AuthService'; const setLogs = (message: any, type: string) => { + const orgId = getUserSession('organizationId'); + const userId = getUserSession('id'); + let logger: any; if (LOGFLARE_API && LOGFLARE_SOURCE) { @@ -38,6 +42,8 @@ const setLogs = (message: any, type: string) => { logMessage = JSON.stringify(message); } + logMessage = `org_id: ${orgId} user_id: ${userId} [${type}] ${message}`; + // log some events switch (type) { case 'info': From d27bd98be79eef28f7d7cdb6a77128b0ff8d69cf Mon Sep 17 00:00:00 2001 From: Akansha Sakhre Date: Fri, 4 Oct 2024 14:17:44 +0530 Subject: [PATCH 2/5] added logs --- src/config/logs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/logs.ts b/src/config/logs.ts index 4f0106e55..dc568de7e 100644 --- a/src/config/logs.ts +++ b/src/config/logs.ts @@ -37,7 +37,7 @@ const setLogs = (message: any, type: string) => { stream ); - let logMessage = message; + let logMessage; if (typeof message === 'object') { logMessage = JSON.stringify(message); } From 69a8f027f2dee4fbfa9781738edb596790f91207 Mon Sep 17 00:00:00 2001 From: Akansha Sakhre Date: Fri, 4 Oct 2024 14:36:31 +0530 Subject: [PATCH 3/5] added logs --- src/config/logs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/logs.ts b/src/config/logs.ts index dc568de7e..ef1bbc050 100644 --- a/src/config/logs.ts +++ b/src/config/logs.ts @@ -39,7 +39,7 @@ const setLogs = (message: any, type: string) => { let logMessage; if (typeof message === 'object') { - logMessage = JSON.stringify(message); + message = JSON.stringify(message); } logMessage = `org_id: ${orgId} user_id: ${userId} [${type}] ${message}`; From 081e0ad6a1fe325b21b08a6173f458c7d3c27a6e Mon Sep 17 00:00:00 2001 From: Akansha Sakhre Date: Tue, 8 Oct 2024 09:54:57 +0530 Subject: [PATCH 4/5] changed order of buttons --- .../Chat/ChatMessages/ConversationHeader/ConversationHeader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/Chat/ChatMessages/ConversationHeader/ConversationHeader.tsx b/src/containers/Chat/ChatMessages/ConversationHeader/ConversationHeader.tsx index 775dcb9a6..dbf2c21fa 100644 --- a/src/containers/Chat/ChatMessages/ConversationHeader/ConversationHeader.tsx +++ b/src/containers/Chat/ChatMessages/ConversationHeader/ConversationHeader.tsx @@ -473,8 +473,8 @@ export const ConversationHeader = ({ options = ( <> {viewDetails} - {addMember} {flowButton} + {addMember} ); } else { From 9bf55ea0afabdb82a19fbcdb089adc4847a2f542 Mon Sep 17 00:00:00 2001 From: Akansha Sakhre Date: Wed, 16 Oct 2024 08:38:12 +0530 Subject: [PATCH 5/5] updating package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 83f29f6d5..70eecf5a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "glific-frontend", - "version": "6.1.8", + "version": "6.1.9", "private": true, "type": "module", "dependencies": {