|
|
@ -3,17 +3,17 @@ import { ClientPlugin } from '@ulixee/hero-plugin-utils'; |
|
|
|
class ClientLogPlugin extends ClientPlugin { |
|
|
|
class ClientLogPlugin extends ClientPlugin { |
|
|
|
|
|
|
|
|
|
|
|
async onHero(hero, sendToCore) { |
|
|
|
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); |
|
|
|
console.log('%s - New Hero is initialized, session id %s.', logTime, await hero.sessionId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async onTab(hero, tab, sendToCore) { |
|
|
|
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); |
|
|
|
console.log('%s - New Tab is initialized, id %s.', logTime, await tab.tabId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async onFrameEnvironment(hero, frameEnvironment, sendToCore) { |
|
|
|
async onFrameEnvironment(hero, frameEnvironment, sendToCore) { |
|
|
|
const logTime = Date.now(); |
|
|
|
const logTime = (new Date()).toLocaleString('zh-CN'); |
|
|
|
console.log('%s - New FrameEnvironment is initialized.', logTime); |
|
|
|
console.log('%s - New FrameEnvironment is initialized.', logTime); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|