From 4200895ee274e72633eab836d00cd8ccad7fde40 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Fri, 3 Jan 2025 10:45:53 +0800 Subject: [PATCH] =?UTF-8?q?perf=EF=BC=9AWA=20=E6=97=A5=E5=BF=97=E5=AD=98?= =?UTF-8?q?=E5=88=B0=20logs=20=E7=9B=AE=E5=BD=95=EF=BC=9B=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E4=B8=8D=E7=94=A8=E7=9A=84=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wai-server/.env.development | 15 --------------- wai-server/.env.example | 8 -------- wai-server/core/baileys/index.js | 2 +- 3 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 wai-server/.env.development delete mode 100644 wai-server/.env.example diff --git a/wai-server/.env.development b/wai-server/.env.development deleted file mode 100644 index 61a8647..0000000 --- a/wai-server/.env.development +++ /dev/null @@ -1,15 +0,0 @@ -PORT=3032 -API_VERSION=0 - -DB_USER='admin' -DB_HOST='202.103.68.93' -DB_PASSWORD='admin' -DB_DATABASE='whatsapp_individual' -DB_PORT=3306 - -NODE_ENV='development' - -WEBHOOK_URL='https://p9axztuwd7x8a7.mycht.cn/whatsapp_server/wawebhook' - -SERVER_DOMAIN='http://202.103.68.93:3031' -SERVER_NAME='aliyun1' diff --git a/wai-server/.env.example b/wai-server/.env.example deleted file mode 100644 index c53e118..0000000 --- a/wai-server/.env.example +++ /dev/null @@ -1,8 +0,0 @@ -PORT= -API_VERSION= - -DB_USER= -DB_HOST= -DB_PASSWORD= -DB_DATABASE= -DB_PORT= diff --git a/wai-server/core/baileys/index.js b/wai-server/core/baileys/index.js index 9a54f50..051efab 100644 --- a/wai-server/core/baileys/index.js +++ b/wai-server/core/baileys/index.js @@ -24,7 +24,7 @@ const createWhatsApp = async phone => { const whatsAppNo = phone; // 缓存 msgId-externalId,过期时间为 5 分钟 const externalIdCache = new NodeCache({ stdTTL: 60*5 }); - const logger = P({ timestamp: () => `,"time":"${new Date().toJSON()}"` }, P.destination('./wa-logs-' + phone + '_' + channelId + '.txt')); + const logger = P({ timestamp: () => `,"time":"${new Date().toJSON()}"` }, P.destination('./logs/wa-logs-' + phone + '_' + channelId + '.txt')); logger.level = 'trace'; const msgRetryCounterCache = new NodeCache(); const storeFilename = './baileys_auth_info/baileys_store_' + phone + '_' + channelId + '.json'