A memory log util for JavaScript Applications
npm install loggi --save
import createLogger from 'loggi'
const Logger = createLogger()
Logger.log('log message')
Logger.info('info message')
Logger.warn('warn message')
Logger.error('error message')
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'