Replace console.warn with logger.warn
Related https://github.com/vector-im/element-web/issues/18425
This commit is contained in:
parent
5e73a212f4
commit
5290afcc4c
71 changed files with 195 additions and 127 deletions
|
@ -182,7 +182,7 @@ export default class SettingsStore {
|
|||
*/
|
||||
public static unwatchSetting(watcherReference: string) {
|
||||
if (!SettingsStore.watchers.has(watcherReference)) {
|
||||
console.warn(`Ending non-existent watcher ID ${watcherReference}`);
|
||||
logger.warn(`Ending non-existent watcher ID ${watcherReference}`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@ import { SettingLevel } from "../SettingLevel";
|
|||
import { PushProcessor } from "matrix-js-sdk/src/pushprocessor";
|
||||
import { PushRuleActionName } from "matrix-js-sdk/src/@types/PushRules";
|
||||
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
// .m.rule.master being enabled means all events match that push rule
|
||||
// default action on this rule is dont_notify, but it could be something else
|
||||
export function isPushNotifyDisabled(): boolean {
|
||||
|
@ -31,7 +33,7 @@ export function isPushNotifyDisabled(): boolean {
|
|||
const masterRule = processor.getPushRuleById(".m.rule.master");
|
||||
|
||||
if (!masterRule) {
|
||||
console.warn("No master push rule! Notifications are disabled for this user.");
|
||||
logger.warn("No master push rule! Notifications are disabled for this user.");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ limitations under the License.
|
|||
import SettingsHandler from "./SettingsHandler";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/client";
|
||||
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
// Dev note: This whole class exists in the event someone logs out and back in - we want
|
||||
// to make sure the right MatrixClient is listening for changes.
|
||||
|
||||
|
@ -48,6 +50,6 @@ export default abstract class MatrixClientBackedSettingsHandler extends Settings
|
|||
}
|
||||
|
||||
protected initMatrixClient(oldClient: MatrixClient, newClient: MatrixClient) {
|
||||
console.warn("initMatrixClient not overridden");
|
||||
logger.warn("initMatrixClient not overridden");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue