Skip to content

Commit 86ad519

Browse files
authored
Merge pull request #3588 from Tyriar/3505
Log characters as a code array when parsing data as well
2 parents 3da594a + 9a3ee49 commit 86ad519

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)