Globally replace all console.logs via codemod (#6827)

This commit replaces all the `console.log` to `logger.log` via an automated script.
Related: vector-im/element-web#18425
This commit is contained in:
Dariusz Niemczyk
2021-09-21 17:48:09 +02:00
committed by GitHub
parent 3a548d4c9c
commit 2d1d42b90e
81 changed files with 396 additions and 258 deletions
+3 -1
View File
@@ -31,6 +31,8 @@ import { Action } from "../dispatcher/actions";
import { retry } from "../utils/promise";
import CountlyAnalytics from "../CountlyAnalytics";
import { logger } from "matrix-js-sdk/src/logger";
const NUM_JOIN_RETRY = 5;
const INITIAL_STATE = {
@@ -319,7 +321,7 @@ class RoomViewStore extends Store<ActionPayload> {
});
const err = payload.err;
let msg = err.message ? err.message : JSON.stringify(err);
console.log("Failed to join room:", msg);
logger.log("Failed to join room:", msg);
if (err.name === "ConnectionError") {
msg = _t("There was an error joining the room");