JSPM

  • Created
  • Published
  • Downloads 14
  • Score
    100M100P100Q53828F
  • License ISC

Let's make logs easier!

Package Exports

  • logifys
  • logifys/log.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (logifys) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

LOGIFYS

npm dependents install size Downloads run on repl.it

Installation

yarn add logifys

or

npm install logifys

Usage

To use LOGIFYS, simply import the package and call the log function:

const log = require('logifys');

log('This is a log message', { font: 'underline', color: 'blue' });

Features

LOGIFYS makes logging easier and nicer to look at with its extensive selection of fonts and colors.


Colors

LOGIFYS supports the following colors:

  • Red,
  • Blue,
  • Green,
  • Yellow,
  • Black,
  • Cyan,
  • Magenta,
  • White,
  • Lime,
  • Brown,
  • Pink,
  • Gray,
  • Purple,
  • Orange

Fonts

LOGIFYS supports the following fonts:

  • Bold,
  • Underline,
  • Italic.

Example

Here is a simple proof of concept for LOGIFYS:

const log = require('logifys');

var points = new Array(100);
for (var i = 0; i < 100; i++) {
    points[i] = i + 1; 
}

for (var i = 0; i < points.length; i++) {
    log(points[i], { font: 'bold', color: 'magenta' }); 
}

This code will produce the following output:

Image

Logging

Here is an example of how the logging to .txt works:

const log = require('logifys');

log('This is an example of logging...', { font: 'bold', color: 'red', file: './log.txt' });

This code will produce the following output:

Image

This code will result it being logged in a .txt file as shown:

Image