From ac49eb9a6c4ba0bd82b146f465790fd4546701c9 Mon Sep 17 00:00:00 2001 From: Adrien de Peretti Date: Mon, 19 May 2025 10:12:44 +0200 Subject: [PATCH] Typo/index logs (#12528) * typo(index): Improve logs content * typo(index): Improve logs content * Create metal-knives-brake.md --- .changeset/metal-knives-brake.md | 5 +++++ packages/modules/index/src/services/data-synchronizer.ts | 4 ++++ packages/modules/index/src/utils/sync/configuration.ts | 8 +++----- 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 .changeset/metal-knives-brake.md diff --git a/.changeset/metal-knives-brake.md b/.changeset/metal-knives-brake.md new file mode 100644 index 0000000000..9e2c5ce242 --- /dev/null +++ b/.changeset/metal-knives-brake.md @@ -0,0 +1,5 @@ +--- +"@medusajs/index": patch +--- + +Typo/index logs diff --git a/packages/modules/index/src/services/data-synchronizer.ts b/packages/modules/index/src/services/data-synchronizer.ts index 2eeb5a8b65..4723c73862 100644 --- a/packages/modules/index/src/services/data-synchronizer.ts +++ b/packages/modules/index/src/services/data-synchronizer.ts @@ -250,6 +250,10 @@ export class DataSynchronizer { const isLink = !!moduleConfig?.isLink if (!alias) { + this.#logger.info( + `[Index engine] Cannot find Entity '${entityName}' alias. Skipping.` + ) + const acknoledgement = { lastCursor: pagination.cursor ?? null, done: true, diff --git a/packages/modules/index/src/utils/sync/configuration.ts b/packages/modules/index/src/utils/sync/configuration.ts index ae37c3cf06..dab634b389 100644 --- a/packages/modules/index/src/utils/sync/configuration.ts +++ b/packages/modules/index/src/utils/sync/configuration.ts @@ -35,9 +35,7 @@ export class Configuration { } async checkChanges(): Promise[]> { - this.#logger.info( - "[Index engine] Checking for changes in the index configuration" - ) + this.#logger.info("[Index engine] Checking for index changes") const schemaObjectRepresentation = this.#schemaObjectRepresentation const currentConfig = await this.#indexMetadataService.list() @@ -145,9 +143,9 @@ export class Configuration { }) this.#logger.info( - `[Index engine] Found ${changes.length} change${ + `[Index engine] Found ${changes.length} index change${ changes.length > 1 ? "s" : "" - } in the index configuration that are either pending or processing` + } that are either pending or processing` ) return changes