You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
move outputting steps to session to scope it to username
This commit is contained in:
@@ -31,6 +31,20 @@ class LogBuffer {
|
||||
}
|
||||
}
|
||||
|
||||
class Logger {
|
||||
constructor(username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
step(description) {
|
||||
process.stdout.write(` * ${this.username} ${description} ... `);
|
||||
}
|
||||
|
||||
done() {
|
||||
process.stdout.write("done\n");
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = class RiotSession {
|
||||
constructor(browser, page, username, riotserver) {
|
||||
this.browser = browser;
|
||||
@@ -43,6 +57,7 @@ module.exports = class RiotSession {
|
||||
const response = await req.response();
|
||||
return `${type} ${response.status()} ${req.method()} ${req.url()} \n`;
|
||||
}, true);
|
||||
this.log = new Logger(this.username);
|
||||
}
|
||||
|
||||
static async create(username, puppeteerOptions, riotserver) {
|
||||
|
||||
Reference in New Issue
Block a user