This commit is contained in:
HuanLinOTO 2023-08-27 22:29:50 +08:00
parent dcfead4e51
commit 0b980891f1
2 changed files with 7 additions and 3 deletions

@ -5,9 +5,9 @@ const reggol = require("reggol")
const { getConfigs, checkConfigs, makeHeader, Notification, Wallet, SendLog, AppVersion, getGlobalConfig } = require("./config")
const urlconfig = require("./config")
const { log, addLogContent } = require("./logger");
const { log, addLogContent, getLogs } = require("./logger");
const nodemailer = require("nodemailer")
const nodemailer = require("nodemailer");
(async () => {
log.info("开始获取全局配置")
@ -70,7 +70,7 @@ const nodemailer = require("nodemailer")
globalConfig.mailConfig.mailto,
successNum,
totalNum,
logContent
getLogs()
)
}
})()

@ -4,6 +4,10 @@ let logContent = ``
exports.addLogContent = function(content) {
logContent += content
}
exports.getLogs = function() {
return logContent
}
exports.log = {
info(content) {
logContent += `<strong style="color: green">[info]</strong> ${content}<br>`