2.0.0 • Published 5 years ago

@ayana/logger-api v2.0.0

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
5 years ago

@ayana/logger-api NPM Discord Install size XO code style

Logger API for usage in libraries

What this is

This is a really small module defining the API of @ayana/logger for usage in libraries.

Why this exists

Some people who make a library might not want to force people to use @ayana/logger but still use it in their applications for logging. With @ayana/logger-api it is up to the user if he want's to use @ayana/logger or not. If the user doesn't install the @ayana/logger module themselves, libraries using @ayana/logger-api won't show any log output. However if the user does install it, the logging will work.

Technically the library user could just disable @ayana/logger but that is configuration effort and also leaves the module installed doing nothing and consuming disk space.

Installation

With NPM

npm i @ayana/logger-api

With Yarn

yarn add @ayana/logger-api

Usage

Look at the README of the main module for usage. Note that some features aren't available for libraries as it is an anti-pattern to access them.

Links

GitLab repository

NPM package

License

Refer to the LICENSE file.