From a04d307350c2a2c65a42fdc43a2ce7a5875e2179 Mon Sep 17 00:00:00 2001 From: maxime Date: Sun, 26 May 2024 20:38:01 +0200 Subject: [PATCH] fix: fixed logger --- .../metadata/google/getGoogleBookMetadata.ts | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/api/src/libs/metadata/google/getGoogleBookMetadata.ts b/packages/api/src/libs/metadata/google/getGoogleBookMetadata.ts index 8a181606..ce07cae2 100644 --- a/packages/api/src/libs/metadata/google/getGoogleBookMetadata.ts +++ b/packages/api/src/libs/metadata/google/getGoogleBookMetadata.ts @@ -18,8 +18,8 @@ export const getGoogleBookMetadata = async ( if (!response.items?.length) { titleRefined = refineTitle(metadata.title ?? "", 1) - Logger.info( - `getGoogleMetadata was unable to find result for isbn:${metadata.isbn} or title:${metadata.title}. Trying to refine title with 2 deepness ${titleRefined}` + logger.info( + `getGoogleMetadata was unable to find result for isbn:${metadata.isbn} or title:${metadata.title}. Trying to refine title with 1 deepness ${titleRefined}` ) response = await findByTitle(titleRefined, apiKey) @@ -27,8 +27,8 @@ export const getGoogleBookMetadata = async ( if (!response.items?.length) { titleRefined = refineTitle(metadata.title ?? "", 2) - Logger.info( - `getGoogleMetadata was unable to find result for ${titleRefined}. Trying to refine title with 3 deepness ${titleRefined}` + logger.info( + `getGoogleMetadata was unable to find result for ${titleRefined}. Trying to refine title with 2 deepness ${titleRefined}` ) response = await findByTitle(titleRefined, apiKey) @@ -37,8 +37,8 @@ export const getGoogleBookMetadata = async ( if (!response.items?.length) { titleRefined = refineTitle(metadata.title ?? "", 3) - Logger.info( - `getGoogleMetadata was unable to find result for ${titleRefined}. Trying to refine title with 4 deepness ${titleRefined}` + logger.info( + `getGoogleMetadata was unable to find result for ${titleRefined}. Trying to refine title with 3 deepness ${titleRefined}` ) response = await findByTitle(titleRefined, apiKey) @@ -47,8 +47,8 @@ export const getGoogleBookMetadata = async ( if (!response.items?.length) { titleRefined = refineTitle(metadata.title ?? "", 4) - Logger.info( - `getGoogleMetadata was unable to find result for ${titleRefined}. Trying to refine title with 5 deepness ${titleRefined}` + logger.info( + `getGoogleMetadata was unable to find result for ${titleRefined}. Trying to refine title with 4 deepness ${titleRefined}` ) response = await findByTitle(titleRefined, apiKey) @@ -57,8 +57,8 @@ export const getGoogleBookMetadata = async ( if (!response.items?.length) { titleRefined = refineTitle(metadata.title ?? "", 5) - Logger.info( - `getGoogleMetadata was unable to find result for ${titleRefined}. Trying to refine title with x deepness ${titleRefined}` + logger.info( + `getGoogleMetadata was unable to find result for ${titleRefined}. Trying to refine title with 5 deepness ${titleRefined}` ) response = await findByTitle(titleRefined, apiKey)