Replace console.error with logger.error

Related https://github.com/vector-im/element-web/issues/18425
This commit is contained in:
Dariusz Niemczyk 2021-10-15 16:56:22 +02:00 committed by Dariusz Niemczyk
parent 515a8d2097
commit db01bfc0fd
9 changed files with 36 additions and 18 deletions

View file

@ -36,6 +36,8 @@ import { parseQs, parseQsFromFragment } from './url_utils';
import VectorBasePlatform from "./platform/VectorBasePlatform";
import { createClient } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
let lastLocationHashSet: string = null;
console.log(`Application is running in ${process.env.NODE_ENV} mode`);
@ -256,7 +258,7 @@ async function verifyServerConfig() {
} catch (e) {
const { hsUrl, isUrl, userId } = await Lifecycle.getStoredSessionVars();
if (hsUrl && userId) {
console.error(e);
logger.error(e);
console.warn("A session was found - suppressing config error and using the session's homeserver");
console.log("Using pre-existing hsUrl and isUrl: ", { hsUrl, isUrl });