1.0.4 • Published 2 years ago

span-logger v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

span-logger

This basic logger library which gives you time difference between your last console log.

Installation

# using npm
npm install span-logger

# using yarn
yarn add span-logger

Usage

# using require
const spanLogger = require('span-logger');
let span = new spanLogger()

span.log('before API call'); // print 1 - before API call - 0.000ms
// this is api call takes 2.000ms
span.log('after api call'); // print 2 - after API call - 2.000ms

spam.record('api call'); // don't log only record

span.allLogs // This will return all logs as Array of JSON Objects

# using import
import span from 'span-logger';
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago