Replace console.error with logger.error
Related https://github.com/vector-im/element-web/issues/18425
This commit is contained in:
parent
9c594a8a96
commit
5e73a212f4
124 changed files with 417 additions and 250 deletions
|
@ -28,6 +28,8 @@ import QuestionDialog from "../../../dialogs/QuestionDialog";
|
|||
import AccessibleButton from "../../../elements/AccessibleButton";
|
||||
import Field from "../../../elements/Field";
|
||||
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
interface IState {
|
||||
busy: boolean;
|
||||
newPersonalRule: string;
|
||||
|
@ -69,7 +71,7 @@ export default class MjolnirUserSettingsTab extends React.Component<{}, IState>
|
|||
await list.banEntity(kind, this.state.newPersonalRule, _t("Ignored/Blocked"));
|
||||
this.setState({ newPersonalRule: "" }); // this will also cause the new rule to be rendered
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
|
||||
Modal.createTrackedDialog('Failed to add Mjolnir rule', '', ErrorDialog, {
|
||||
title: _t('Error adding ignored user/server'),
|
||||
|
@ -90,7 +92,7 @@ export default class MjolnirUserSettingsTab extends React.Component<{}, IState>
|
|||
await Mjolnir.sharedInstance().subscribeToList(room.roomId);
|
||||
this.setState({ newList: "" }); // this will also cause the new rule to be rendered
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
|
||||
Modal.createTrackedDialog('Failed to subscribe to Mjolnir list', '', ErrorDialog, {
|
||||
title: _t('Error subscribing to list'),
|
||||
|
@ -107,7 +109,7 @@ export default class MjolnirUserSettingsTab extends React.Component<{}, IState>
|
|||
const list = Mjolnir.sharedInstance().getPersonalList();
|
||||
await list.unbanEntity(rule.kind, rule.entity);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
|
||||
Modal.createTrackedDialog('Failed to remove Mjolnir rule', '', ErrorDialog, {
|
||||
title: _t('Error removing ignored user/server'),
|
||||
|
@ -124,7 +126,7 @@ export default class MjolnirUserSettingsTab extends React.Component<{}, IState>
|
|||
await Mjolnir.sharedInstance().unsubscribeFromList(list.roomId);
|
||||
await MatrixClientPeg.get().leave(list.roomId);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
|
||||
Modal.createTrackedDialog('Failed to unsubscribe from Mjolnir list', '', ErrorDialog, {
|
||||
title: _t('Error unsubscribing from list'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue