UNPKG

mailchimp-app

Version:

A Mailchimp express sub-app to mount on any project, for easy integration

35 lines (19 loc) 1.07 kB
var term = require('terminal-kit').terminal; module.exports = MailchimpLogger; function MailchimpLogger(){ } MailchimpLogger.prototype.debug = function( message ){ term('[ ') + term.bold.white('Mailchimp') + term(' ]') + term(' -> ') + term( JSON.stringify(message, null, 4) ) + term('\n'); } MailchimpLogger.prototype.info = function( message ){ term('[ ') + term.bold.magenta('Mailchimp') + term(' ]') + term(' -> ') + term( JSON.stringify(message, null, 4) ) + term('\n'); } MailchimpLogger.prototype.warn = function( message ){ term('[ ') + term.bold.yellow('Mailchimp') + term(' ]') + term(' -> ') + term( JSON.stringify(message, null, 4) ) + term('\n'); } MailchimpLogger.prototype.success = function( message ){ term('[ ') + term.bold.green('Mailchimp') + term(' ]') + term(' -> ') + term( JSON.stringify(message, null, 4) ) + term('\n'); } MailchimpLogger.prototype.error = function( message ){ term('[ ') + term.bold.red('Mailchimp') + term(' ]') + term(' -> ') + term( JSON.stringify(message, null, 4) ) + term('\n'); }