Skip to content

Commit 84f746b

Browse files
committed
🔊 change Request/Response to IN/OUT#2452
1 parent fb80a01 commit 84f746b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,15 +540,15 @@ export class Client {
540540
if(logging) {
541541
const wapis = (pageFunction?.toString()?.match(/WAPI\.(\w*)\(/g) || [])?.map(s=>s.replace(/WAPI|\.|\(/g,''));
542542
_t = Date.now()
543-
log.info(`Request ${invocation_id}`,{
543+
log.info(`IN ${invocation_id}`,{
544544
_method: wapis?.length === 1 ? wapis[0] : wapis,
545545
...args[0]
546546
})
547547
}
548548
if(callTimeout) return await Promise.race([this._page.evaluate(pageFunction, ...args),new Promise((resolve, reject) => setTimeout(reject, this._createConfig?.callTimeout, new PageEvaluationTimeout()))])
549549
const res = await this._page.evaluate(pageFunction, ...args);
550550
if(_t && logging) {
551-
log.info(`Response ${invocation_id}: ${Date.now() - _t}ms`, {res})
551+
log.info(`OUT ${invocation_id}: ${Date.now() - _t}ms`, {res})
552552
}
553553
if(this._createConfig.onError && typeof res == "string" && (res.startsWith("Error") || res.startsWith("ERROR"))) {
554554
const e = this._createConfig.onError;

0 commit comments

Comments
 (0)