diff --git a/src/index.js b/src/index.js
index 87f3e44..c013f61 100644
--- a/src/index.js
+++ b/src/index.js
@@ -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()
)
}
})()
\ No newline at end of file
diff --git a/src/logger.js b/src/logger.js
index 507158c..1213538 100644
--- a/src/logger.js
+++ b/src/logger.js
@@ -4,6 +4,10 @@ let logContent = ``
exports.addLogContent = function(content) {
logContent += content
}
+exports.getLogs = function() {
+ return logContent
+}
+
exports.log = {
info(content) {
logContent += `[info] ${content}
`