17 lines
522 B
JavaScript
17 lines
522 B
JavaScript
const colors = require('colors')
|
|
|
|
module.exports = {
|
|
cclog(...args) {
|
|
console.log(colors.grey({time: new Date().toJSON()}), ...args)
|
|
},
|
|
ccinfo(...args) {
|
|
console.info(colors.green({time: new Date().toJSON()}), ...args)
|
|
},
|
|
ccerr(...args) { // console.error will appear in pm2's error log
|
|
console.error(colors.red({time: new Date().toJSON()}), ...args)
|
|
},
|
|
ccwarn(...args) { // console.warn will appear in pm2's error log
|
|
console.warn(colors.yellow({time: new Date().toJSON()}), ...args)
|
|
},
|
|
}
|