Winston based logger for compound.js
Replace default CompoundJS logger with Winston
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);
};
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");