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

1.1.2 • Public • Published

npm version tests coverage

logger

A simple logging utility.

Can log simple messages along with:

  • arbitrary data, presented «as is» to view in the browser console or formatted to a json (configurable).
  • ability to throw an error along with log messages, stopping execution.
  • ability to alert a message using browser «alert».

Install

npm install @aliser/logger

Usage

import Logger from "@aliser/logger";

// 1. log using one of the methods
const logger = new Logger();
logger.logInfo(msg);

// 2. or destructure the methods you need
const logger = new Logger();
const { logInfo, logError } = logger;
logInfo(msg);

Readme

Keywords

Package Sidebar

Install

npm i @aliser/logger

Weekly Downloads

1

Version

1.1.2

License

MIT

Unpacked Size

24.9 kB

Total Files

13

Last publish

Collaborators

  • aliser