@ayanaware/logger-api
v2.2.0
Published
Logger API for usage in libraries
Downloads
66
Readme
@ayanaware/logger-api
Logger API for usage in libraries
What this is
This is a really small module defining the API of @ayanaware/logger for usage in libraries.
Why this exists
Some people who make a library might not want to force people to use @ayanaware/logger
but still use it in their applications for logging. With @ayanaware/logger-api
it is up to the user if he want's to use @ayanaware/logger
or not. If the user doesn't install the @ayanaware/logger
module themselves, libraries using @ayanaware/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 @ayanaware/logger
but that is configuration effort and also leaves the module installed doing nothing and consuming disk space.
Installation
With NPM
npm i @ayanaware/logger-api
With Yarn
yarn add @ayanaware/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
License
Refer to the LICENSE file.