Merge pull request #3331 from matrix-org/jaywink/extra-rageshake-cleanup

Tweak rageshake logging messages
This commit is contained in:
Travis Ralston 2019-08-23 09:59:05 -06:00 committed by GitHub
commit dc0c7e3053
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,7 +88,9 @@ class ConsoleLogger {
// run.
// Example line:
// 2017-01-18T11:23:53.214Z W Failed to set badge count
const line = `${ts} ${level} ${args.join(' ')}\n`;
let line = `${ts} ${level} ${args.join(' ')}\n`;
// Do some cleanup
line = line.replace(/token=[a-zA-Z0-9-]+/gm, 'token=xxxxx');
// Using + really is the quickest way in JS
// http://jsperf.com/concat-vs-plus-vs-join
this.logs += line;