diff --git a/src/dailyTask/getFollow.ts b/src/dailyTask/getFollow.ts index a11e624..0967350 100644 --- a/src/dailyTask/getFollow.ts +++ b/src/dailyTask/getFollow.ts @@ -156,10 +156,11 @@ export default async function (page: Page): Promise { errorflag = true; logger.error(error.message); + const curTime = Date.now(); logger.debug(page.url()); - logger.debug('出现bug,截图中...'); + logger.debug('出现bug,截图中...', curTime); await page.screenshot({ - path: `./logs/${Date.now()}-getfollow.png`, + path: `./logs/${curTime}-getfollow.png`, }); if (curFollowUrl && curFollowUrl.length !== 0) { diff --git a/src/dailyTask/upTask.ts b/src/dailyTask/upTask.ts index 11207bb..e8d3806 100644 --- a/src/dailyTask/upTask.ts +++ b/src/dailyTask/upTask.ts @@ -271,9 +271,11 @@ export class UPTask { try { await Promise.all(runArray); } catch (error) { - logger.debug('出现bug,截图中...'); + logger.error(error.message); + const curTime = Date.now(); + logger.debug('出现bug,截图中...', curTime); await this.page.screenshot({ - path: `./logs/${Date.now()}-upTask.png`, + path: `./logs/${curTime}-upTask.png`, }); throw error; }