feat: v1.1.4

This commit is contained in:
mol
2023-05-31 14:21:33 +08:00
commit 9b8dafefb1
17 changed files with 596 additions and 0 deletions

25
utils/logger.js Normal file
View File

@ -0,0 +1,25 @@
const dayjs = require('dayjs');
function info(message) {
console.log(`${dayjs().format('YYYY-MM-DD hh:mm:ss')}【消息】${message}`);
}
function warning(message) {
console.log(`${dayjs().format('YYYY-MM-DD hh:mm:ss')}【警告】${message}`);
}
function error(message) {
console.log(`${dayjs().format('YYYY-MM-DD hh:mm:ss')}【错误】${message}`);
}
function logger(message) {
info(message);
}
logger.prototype.warning = warning;
logger.prototype.info = info;
logger.prototype.error = error;
module.exports = logger;