From 3e9648e3d6450c4e30de2af7ab19332f26c2fde7 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Mon, 7 Aug 2023 17:41:23 -0400 Subject: [PATCH] docs: add the missing import logger statement (#9210) --- packages/docusaurus-logger/README.md | 2 ++ website/docs/api/misc/logger/logger.mdx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/docusaurus-logger/README.md b/packages/docusaurus-logger/README.md index 5372474d484b..394c54ce3787 100644 --- a/packages/docusaurus-logger/README.md +++ b/packages/docusaurus-logger/README.md @@ -40,6 +40,8 @@ In addition, `warn` and `error` will color the **entire** message for better att The template literal tag evaluates the template and expressions embedded. `interpolate` returns a new string, while other logging functions prints it. Below is a typical usage: ```js +import logger from '@docusaurus/logger'; + logger.info`Hello name=${name}! You have number=${money} dollars. Here are the ${ items.length > 1 ? 'items' : 'item' } on the shelf: ${items} diff --git a/website/docs/api/misc/logger/logger.mdx b/website/docs/api/misc/logger/logger.mdx index 04800ed25b78..8ce3f5ac2925 100644 --- a/website/docs/api/misc/logger/logger.mdx +++ b/website/docs/api/misc/logger/logger.mdx @@ -49,6 +49,8 @@ In addition, `warn` and `error` will color the **entire** message for better att The template literal tag evaluates the template and expressions embedded. `interpolate` returns a new string, while other logging functions prints it. Below is a typical usage: ```js +import logger from '@docusaurus/logger'; + logger.info`Hello name=${name}! You have number=${money} dollars. Here are the ${ items.length > 1 ? 'items' : 'item' } on the shelf: ${items}