From 83ae73fea7e33c98448b2250104a3846c5c6c5f6 Mon Sep 17 00:00:00 2001 From: filesite Date: Tue, 19 Sep 2023 14:23:37 +0800 Subject: [PATCH] change log time's format --- plugin/ClientLogPlugin.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/ClientLogPlugin.mjs b/plugin/ClientLogPlugin.mjs index 84d073a..0026482 100644 --- a/plugin/ClientLogPlugin.mjs +++ b/plugin/ClientLogPlugin.mjs @@ -3,17 +3,17 @@ import { ClientPlugin } from '@ulixee/hero-plugin-utils'; class ClientLogPlugin extends ClientPlugin { async onHero(hero, sendToCore) { - const logTime = Date.now(); + const logTime = (new Date()).toLocaleString('zh-CN'); console.log('%s - New Hero is initialized, session id %s.', logTime, await hero.sessionId); } async onTab(hero, tab, sendToCore) { - const logTime = Date.now(); + const logTime = (new Date()).toLocaleString('zh-CN'); console.log('%s - New Tab is initialized, id %s.', logTime, await tab.tabId); } async onFrameEnvironment(hero, frameEnvironment, sendToCore) { - const logTime = Date.now(); + const logTime = (new Date()).toLocaleString('zh-CN'); console.log('%s - New FrameEnvironment is initialized.', logTime); }