Replace console.info with logger.info

Related https://github.com/vector-im/element-web/issues/18425
This commit is contained in:
Dariusz Niemczyk 2021-10-15 16:32:15 +02:00 committed by Dariusz Niemczyk
parent 5290afcc4c
commit 2c66403b3c
11 changed files with 21 additions and 21 deletions

View file

@ -97,7 +97,7 @@ export default class CaptchaForm extends React.Component<ICaptchaFormProps, ICap
+ "authentication");
}
console.info("Rendering to %s", divId);
logger.info("Rendering to %s", divId);
this.captchaWidgetId = global.grecaptcha.render(divId, {
sitekey: publicKey,
callback: this.props.onCaptchaResponse,

View file

@ -162,7 +162,7 @@ const WidgetContextMenu: React.FC<IProps> = ({
let revokeButton;
if (!userWidget && !isLocalWidget && isAllowedWidget) {
const onRevokeClick = () => {
console.info("Revoking permission for widget to load: " + app.eventId);
logger.info("Revoking permission for widget to load: " + app.eventId);
const current = SettingsStore.getValue("allowedWidgets", roomId);
current[app.eventId] = false;
const level = SettingsStore.firstSupportedLevel("allowedWidgets");

View file

@ -314,7 +314,7 @@ export default class AppTile extends React.Component<IProps, IState> {
private grantWidgetPermission = (): void => {
const roomId = this.props.room.roomId;
console.info("Granting permission for widget to load: " + this.props.app.eventId);
logger.info("Granting permission for widget to load: " + this.props.app.eventId);
const current = SettingsStore.getValue("allowedWidgets", roomId);
current[this.props.app.eventId] = true;
const level = SettingsStore.firstSupportedLevel("allowedWidgets");

View file

@ -658,7 +658,7 @@ const RedactMessagesButton: React.FC<IBaseProps> = ({ member }) => {
// so first yield to allow to rerender after closing the dialog.
await Promise.resolve();
console.info(`Started redacting recent ${count} messages for ${user} in ${roomId}`);
logger.info(`Started redacting recent ${count} messages for ${user} in ${roomId}`);
await Promise.all(eventsToRedact.map(async event => {
try {
await cli.redactEvent(roomId, event.getId());
@ -668,7 +668,7 @@ const RedactMessagesButton: React.FC<IBaseProps> = ({ member }) => {
logger.error(err);
}
}));
console.info(`Finished redacting recent ${count} messages for ${user} in ${roomId}`);
logger.info(`Finished redacting recent ${count} messages for ${user} in ${roomId}`);
}
};