Package Exports
- zog
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 (zog) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
zog
A wrapper around the
debugmodule to infer logger namespace from filename, support logging levels, and have support for CommonJS and ES6.
Install
npm i zogUsage
Infer namespace from filename
// foo/bar.js
import {log, info, debug, warn, error} from 'live-log'
log('hello')
info('hello')
debug('hello')
warn('hello')
error('hello')Output
foo/bar hello
foo/bar hello
foo/bar hello
foo/bar WARNING: hello
foo/bar ERROR: helloExplicit namespace
// foo/index.js
const logger = require('live-log')('foo')
logger.log('hello')foo helloAPI
default logger Logger info log debug warn error
Convenience
time timeEnd xcolor xc c Debug