npm

npm’s 2019 JavaScript ecosystem survey analysis is now available!Get your copy here »

loggi

1.0.1 • Public • Published

loggi

A memory log util for JavaScript Applications

Table of contents

🔧 Installation

npm install loggi --save

🕹 Usage

Basic Usage

import createLogger from 'loggi'
 
const Logger = createLogger()
 
Logger.log('log message')
Logger.info('info message')
Logger.warn('warn message')
Logger.error('error message')

Log Levels and Debug

import createLogger, { LOG_LEVELS } from 'loggi'
 
const Logger = createLogger({
  logLevel: LOG_LEVELS.ERROR,
})
 
Logger.log('log message')
Logger.info('info message')
Logger.warn('warn message')
Logger.error('error message')
 
// Prints:
// > error: 'error message'
 
Logger.debug()
 
// Prints:
// > log: 'log message'
// > info: 'info message'
// > warn: 'warn message'
// > error: 'error message'

install

npm i loggi

Downloadsweekly downloads

19

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability