Skip to content

Add simple example and import statement to logger API docs #8787

@ZenaMel

Description

@ZenaMel

Have you read the Contributing Guidelines on issues?

Description

Affecting: https://docusaurus.io/docs/api/misc/@docusaurus/logger

At the very least, having sample code on how to import the logger and at one logger call would be great (simple usage, besides the template literal method, e.g. logger.green("some text")). That way, readers wouldn't have to browse the Docusaurus source code just to know how to use the logger package.

The logger is useful not just for plugin authors, but also if you've got any complex React components you'd like some logging on for errors etc.

Self-service

  • I'd be willing to address this documentation request myself.

Metadata

Metadata

Assignees

Labels

documentationThe issue is related to the documentation of Docusaurus

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions