mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-28 17:57:48 +02:00
docs: add the missing import logger statement (#9210)
This commit is contained in:
parent
3c1fe15b17
commit
3e9648e3d6
2 changed files with 4 additions and 0 deletions
|
@ -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}
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Add table
Reference in a new issue