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

1.0.6 • Public • Published

@iamyth/logger

A nice console logger which makes your message look fantastic.

Installation

$ yarn add -D @iamyth/logger
// or
$ npm install -D @iamyth/logger

Usage

import { createConsoleLogger } from '@iamyth/logger';

const myLogger = createConsoleLogger('My Task');

// Log simple Text, or accept Array of string
myLogger.info('Simple Text...');
myLogger.task(['Simple Text...']);
myLogger.error('Simple Text...');

// Log JavaScript Error, or accept Array of Error
myLogger.info(new Error('401 Unauthorized'));
myLogger.task([new Error('404 Not Found')]);
myLogger.error([new Error('Unexpected error occurred')]);

// Prompt User Input
myLogger.prompt('What is your name ?').then((answer) => {});

DEMO

Readme

Keywords

none

Package Sidebar

Install

npm i @iamyth/logger

Weekly Downloads

150

Version

1.0.6

License

MIT

Unpacked Size

31.5 kB

Total Files

8

Last publish

Collaborators

  • jamyth