From 03bc33976a209b366bd9f451427226d9c689d9a3 Mon Sep 17 00:00:00 2001 From: filesite Date: Mon, 11 Sep 2023 09:44:58 +0800 Subject: [PATCH] error log update --- bot/Douyin.mjs | 2 +- test/cloud_test.mjs | 2 +- test/douyin_test.mjs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/Douyin.mjs b/bot/Douyin.mjs index 536245c..2748136 100644 --- a/bot/Douyin.mjs +++ b/bot/Douyin.mjs @@ -37,7 +37,7 @@ class Douyin { await hero.close(); }catch(error) { - console.error('ERROR when request url via hero', url, error); + console.error("Error got when request %s via hero: %s", url, error); }; return data; diff --git a/test/cloud_test.mjs b/test/cloud_test.mjs index 2d3bef4..73c6186 100644 --- a/test/cloud_test.mjs +++ b/test/cloud_test.mjs @@ -16,6 +16,6 @@ import Hero from '@ulixee/hero'; await hero.close(); })().catch(error => { - console.log('ERROR when request url via hero', error); + console.error("Error got:\n%s", error); process.exit(1); }); diff --git a/test/douyin_test.mjs b/test/douyin_test.mjs index 61356aa..c0550f5 100644 --- a/test/douyin_test.mjs +++ b/test/douyin_test.mjs @@ -33,6 +33,6 @@ import Hero from '@ulixee/hero'; await hero.close(); })().catch(error => { - console.log('ERROR when request url via hero', error); + console.error("Error got:\n%s", error); process.exit(1); });