JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q39555F
  • License BSD

Winston based logger for CompoundJS

Package Exports

  • co-logger

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

Readme

co-logger

Winston based logger for compound.js

Replace default CompoundJS logger with Winston

Installation

Step 1. install using npm:

npm install co-logger --save

Step 2. add co-logger to config/autoload.js, for example:

module.exports = function (compound) {
    return [
        'ejs-ext',
        'jugglingdb',
        'seedjs',
        'co-logger'
    ].map(require);
};

Usages

You can use co-logger with old way:

compound.logger.write("My log message")

Or:

log = require("co-logger");
log.debug("My log message");
log.error("My log message with error", err);

Or:

compound.logger.warn("My log message");