docs: add the missing import logger statement (#9210)

This commit is contained in:
Joshua Chen 2023-08-07 17:41:23 -04:00 committed by GitHub
parent 3c1fe15b17
commit 3e9648e3d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -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}

View file

@ -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}