@ayanaware/logger-api
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

@ayanaware/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 @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

GitLab repository

NPM package

License

Refer to the LICENSE file.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @ayanaware/logger-api

      Weekly Downloads

      239

      Version

      2.2.0

      License

      MIT

      Unpacked Size

      9.45 kB

      Total Files

      7

      Last publish

      Collaborators

      • hcgrandon
      • akio