Skip to content

Commit 9a3ee49

Browse files
committed
Log characters as a code array when parsing data as well
Makes it consistent with sending data debug logs Fixes #3505
1 parent 72308b4 commit 9a3ee49

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/common/InputHandler.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,13 @@ export class InputHandler extends Disposable implements IInputHandler {
544544
}
545545
}
546546

547-
this._logService.debug('parsing data', data);
547+
// Log debug data, the log level gate is to prevent extra work in this hot path
548+
if (this._logService.logLevel <= LogLevelEnum.DEBUG) {
549+
this._logService.debug(`parsing data${typeof data === 'string' ? ` "${data}"` : ''}`, typeof data === 'string'
550+
? data.split('').map(e => e.charCodeAt(0))
551+
: data
552+
);
553+
}
548554

549555
// resize input buffer if needed
550556
if (this._parseBuffer.length < data.length) {

0 commit comments

Comments
 (0)