u
This commit is contained in:
18
tool4log.unicloud.js
Normal file
18
tool4log.unicloud.js
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
module.exports = {
|
||||
cclog(...args) {
|
||||
console.log({timeiso: new Date().toJSON(), backend: 'UNICLOUD'}, ...args)
|
||||
},
|
||||
ccinfo(...args) {
|
||||
console.info({timeiso: new Date().toJSON(), backend: 'UNICLOUD'}, ...args)
|
||||
},
|
||||
ccerr(...args) { // console.error will appear in pm2's error log
|
||||
console.error({timeiso: new Date().toJSON(), backend: 'UNICLOUD'}, ...args)
|
||||
},
|
||||
ccwarn(...args) { // console.warn will appear in pm2's error log
|
||||
console.warn({timeiso: new Date().toJSON(), backend: 'UNICLOUD'}, ...args)
|
||||
},
|
||||
ccdev(...args) {
|
||||
'development'===process.env.NODE_ENV && console.log({timeiso: new Date().toJSON()}, ...args)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user