Skip to content

Commit

Permalink
Merge pull request #133 from mbret/develop
Browse files Browse the repository at this point in the history
fix: fixed logger
  • Loading branch information
mbret authored May 26, 2024
2 parents be720a6 + a04d307 commit b8b47a7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/api/src/libs/metadata/google/getGoogleBookMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ 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)

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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit b8b47a7

Please sign in to comment.