Improved logging of strings with embedded carriage returns
This commit is contained in:
parent
a3c252bf99
commit
aefe2b4b5b
21 changed files with 488 additions and 407 deletions
|
|
@ -999,7 +999,7 @@ class Keyboard extends Component {
|
|||
{
|
||||
if (sKeys && !this.sInjectBuffer) {
|
||||
this.sInjectBuffer = this.parseKeys(sKeys);
|
||||
if (!COMPILED) this.log("injectKeys(" + this.sInjectBuffer.split("\n").join("\\n") + ")");
|
||||
if (!COMPILED) this.log("injectKeys(\"" + this.sInjectBuffer.split("\n").join("\\n") + "\")");
|
||||
this.injectKeysFromBuffer(msDelay || this.msInjectDelay);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -244,7 +244,8 @@ class Component {
|
|||
}
|
||||
sElapsed = (Component.getTime() - Component.msStart) + "ms: ";
|
||||
}
|
||||
if (window && window.console) console.log(sElapsed + sMsg.replace(/\n/g, ' '));
|
||||
sMsg = sMsg.replace(/\r/g, '\\r').replace(/\n/g, ' ');
|
||||
if (window && window.console) console.log(sElapsed + sMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue