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

0.6.0 • Public • Published

Table of content

Package @aloxide/logger

This is a simple logger interface allows use any available logger.

Usage

// typescript
import type { Logger } from '@aloxide/logger';

It also provides a colorized console-log:

// typescript
import { createLogger } from '@aloxide/logger';

declare global {
  var logger: Logger;
}

// if consoleLogger is set to false, the function will create a null logger
// which do nothing with log
global.logger = createLogger({ consoleLogger: true });

logger.debug('Set up logger');

Dependents (1)

Package Sidebar

Install

npm i @aloxide/logger

Weekly Downloads

9

Version

0.6.0

License

Apache-2.0

Unpacked Size

7.52 kB

Total Files

9

Last publish

Collaborators

  • flowersinthesand
  • manhvu