make rocket.chat sdk shut up

and better error logging
This commit is contained in:
Lamp 2020-04-09 15:02:18 -07:00 committed by GitHub
parent 56987ae761
commit 157b32fe79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,13 @@
var driver = RocketChat.driver;
var api = RocketChat.api;
driver.useLog({
debug: ()=>{},
info: ()=>{},
warn: x => onError(x, 'Rocket.chat Warning'),
error: x => onError(x, 'Rocket.chat Error')
});
await driver.connect();
await driver.login(); // using environment variables
await driver.subscribeToMessages();