architect-logger

Winston plugin for Architect

architect-logger

This plugin uses winston as a logging backend

{
  "packagePath": "./node_modules/architect-logger",
  "exitOnError": false,
  "transports": {
    "console": {
      "colorize": true,
      "level": "verbose"
    },
    "file": {
      "filename": "./logs/errors.log",
      "level": "warn"
    }
  }
}

Let's use that puppy in our plugin

module.exports = function (optionsimportsregister) {
 
  var log = imports.logger;
 
  logger.info("Hello!");
  logger.warn("Uh oh! There's an error coming...");
  logger.error("We're going down");
 
};
  • Support for multiple categories