JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q16453F
  • License MIT

Simple no-dependency console logger that prefixes all logs with given tag.

Package Exports

  • tagged-console
  • tagged-console/dist/index.js
  • tagged-console/src/index.js

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 (tagged-console) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Tagged Console

Purpose

This package offers only single class that wraps console compliant logger and logs all statements with a given tag.

More documentation will follow. For now, please read example use case:

Example use case

import TaggedConsole from 'tagged-console';

const logger = new TaggedConsole('SomeModule');

logger.log('Some message'); // prints [SomeModule]: Some message

Methods

Currently it offers following methods:

  • log
  • warn
  • error
  • dispatchLog(method, msg, ...args) (which evaluates to console[method](taggedMessage, ...rest))

Status

This module is production ready.

Contributing

Any contribution is appreciated! Feel free to join this project on GitHub