This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

node-tag-log

1.0.5 • Public • Published

A very minimalistic logging helper.

See src/libs/index.js for the implementation. It's only a few lines of code so far.

Setup

npm install https://github.com/C5H8NNaO4/node-tag-log

Quick Start

import {log, called, assigned, debug, caught} from '.';
import * as LEVELS from './levels'

process.env.LOG_LEVEL = LEVELS.debug

log`Hello World`
debug`Will only be shown when the log level is set to debug`

function initStateMachine (definition) {
    called`initStateMachine (definition = ${definition})`;
    let machine;
    try {
        machine = new Machine (definition);
        assigned`machine = ${machine} = new Machine (stateMachine);`
    } catch (e) {
        caught`Error ${e}[0-4]`
    }
    return machine;
}

function Machine (definition) {
    this.id = 'hello-world'
}

initStateMachine ({})

Build

npm run build

Runs babel src --out-dir lib

Test

npm run test

Runs jest

Readme

Keywords

Package Sidebar

Install

npm i node-tag-log

Weekly Downloads

1

Version

1.0.5

License

ISC

Unpacked Size

33.8 kB

Total Files

26

Last publish

Collaborators

  • moritzroessler