@graphql-markdown/logger
v1.1.3
Published
GraphQL-Markdown logger.
Readme
@graphql-markdown/logger
Singleton logger used across GraphQL-Markdown packages. Defaults to console, but can be pointed at any object exposing standard log-level methods (debug, error, info, log, warn) or a custom module such as @docusaurus/logger.
Installation
npm install @graphql-markdown/loggerUsage
import Logger, { log } from "@graphql-markdown/logger";
log("Info message"); // console output "Info message"
// Point the logger at a named module
await Logger("@docusaurus/logger");
log("Info message", "info"); // Docusaurus log output "Info message"
// Or a custom logger instance
await Logger({ info: (message) => process.stdout.write(message) });
log("Info message", "info"); // custom logger output "Info message"License
GraphQL-Markdown packages are 100% free and open-source, under the MIT license.
This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest, you'll be creating employment for local families and restoring wildlife habitats.
