Replace console.warn with logger.warn
Related https://github.com/vector-im/element-web/issues/18425
This commit is contained in:
parent
dc9f77a509
commit
85a81af1da
4 changed files with 11 additions and 11 deletions
|
@ -222,7 +222,7 @@ async function verifyServerConfig() {
|
||||||
|
|
||||||
if (hsUrl) {
|
if (hsUrl) {
|
||||||
logger.log("Config uses a default_hs_url - constructing a default_server_config using this information");
|
logger.log("Config uses a default_hs_url - constructing a default_server_config using this information");
|
||||||
console.warn(
|
logger.warn(
|
||||||
"DEPRECATED CONFIG OPTION: In the future, default_hs_url will not be accepted. Please use " +
|
"DEPRECATED CONFIG OPTION: In the future, default_hs_url will not be accepted. Please use " +
|
||||||
"default_server_config instead.",
|
"default_server_config instead.",
|
||||||
);
|
);
|
||||||
|
@ -247,7 +247,7 @@ async function verifyServerConfig() {
|
||||||
|
|
||||||
if (serverName) {
|
if (serverName) {
|
||||||
logger.log("Config uses a default_server_name - doing .well-known lookup");
|
logger.log("Config uses a default_server_name - doing .well-known lookup");
|
||||||
console.warn(
|
logger.warn(
|
||||||
"DEPRECATED CONFIG OPTION: In the future, default_server_name will not be accepted. Please " +
|
"DEPRECATED CONFIG OPTION: In the future, default_server_name will not be accepted. Please " +
|
||||||
"use default_server_config instead.",
|
"use default_server_config instead.",
|
||||||
);
|
);
|
||||||
|
@ -259,7 +259,7 @@ async function verifyServerConfig() {
|
||||||
const { hsUrl, isUrl, userId } = await Lifecycle.getStoredSessionVars();
|
const { hsUrl, isUrl, userId } = await Lifecycle.getStoredSessionVars();
|
||||||
if (hsUrl && userId) {
|
if (hsUrl && userId) {
|
||||||
logger.error(e);
|
logger.error(e);
|
||||||
console.warn("A session was found - suppressing config error and using the session's homeserver");
|
logger.warn("A session was found - suppressing config error and using the session's homeserver");
|
||||||
|
|
||||||
logger.log("Using pre-existing hsUrl and isUrl: ", { hsUrl, isUrl });
|
logger.log("Using pre-existing hsUrl and isUrl: ", { hsUrl, isUrl });
|
||||||
validatedConfig = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, isUrl, true);
|
validatedConfig = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, isUrl, true);
|
||||||
|
|
|
@ -56,7 +56,7 @@ export function setupLogStorage() {
|
||||||
if (SdkConfig.get().bug_report_endpoint_url) {
|
if (SdkConfig.get().bug_report_endpoint_url) {
|
||||||
return initRageshakeStore();
|
return initRageshakeStore();
|
||||||
}
|
}
|
||||||
console.warn("No bug report endpoint set - logs will not be persisted");
|
logger.warn("No bug report endpoint set - logs will not be persisted");
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ let meetApi: any; // JitsiMeetExternalAPI
|
||||||
]);
|
]);
|
||||||
widgetApi.start();
|
widgetApi.start();
|
||||||
} else {
|
} else {
|
||||||
console.warn("No parent URL or no widget ID - assuming no widget API is available");
|
logger.warn("No parent URL or no widget ID - assuming no widget API is available");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Populate the Jitsi params now
|
// Populate the Jitsi params now
|
||||||
|
@ -208,7 +208,7 @@ function joinConference() { // event handler bound in HTML
|
||||||
if (jitsiAuth === JITSI_OPENIDTOKEN_JWT_AUTH) {
|
if (jitsiAuth === JITSI_OPENIDTOKEN_JWT_AUTH) {
|
||||||
if (!openIdToken?.access_token) { // eslint-disable-line camelcase
|
if (!openIdToken?.access_token) { // eslint-disable-line camelcase
|
||||||
// We've failing to get a token, don't try to init conference
|
// We've failing to get a token, don't try to init conference
|
||||||
console.warn('Expected to have an OpenID credential, cannot initialize widget.');
|
logger.warn('Expected to have an OpenID credential, cannot initialize widget.');
|
||||||
document.getElementById("widgetActionContainer").innerText = "Failed to load Jitsi widget";
|
document.getElementById("widgetActionContainer").innerText = "Failed to load Jitsi widget";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ function joinConference() { // event handler bound in HTML
|
||||||
widgetApi.setAlwaysOnScreen(true);
|
widgetApi.setAlwaysOnScreen(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.warn(
|
logger.warn(
|
||||||
"[Jitsi Widget] The next few errors about failing to parse URL parameters are fine if " +
|
"[Jitsi Widget] The next few errors about failing to parse URL parameters are fine if " +
|
||||||
"they mention 'external_api' or 'jitsi' in the stack. They're just Jitsi Meet trying to parse " +
|
"they mention 'external_api' or 'jitsi' in the stack. They're just Jitsi Meet trying to parse " +
|
||||||
"our fragment values and not recognizing the options.",
|
"our fragment values and not recognizing the options.",
|
||||||
|
|
|
@ -126,12 +126,12 @@ class SeshatIndexManager extends BaseEventIndexManager {
|
||||||
|
|
||||||
private onIpcReply = (ev: {}, payload: IPCPayload) => {
|
private onIpcReply = (ev: {}, payload: IPCPayload) => {
|
||||||
if (payload.id === undefined) {
|
if (payload.id === undefined) {
|
||||||
console.warn("Ignoring IPC reply with no ID");
|
logger.warn("Ignoring IPC reply with no ID");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.pendingIpcCalls[payload.id] === undefined) {
|
if (this.pendingIpcCalls[payload.id] === undefined) {
|
||||||
console.warn("Unknown IPC payload ID: " + payload.id);
|
logger.warn("Unknown IPC payload ID: " + payload.id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -505,12 +505,12 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
|
|
||||||
private onIpcReply = (ev, payload) => {
|
private onIpcReply = (ev, payload) => {
|
||||||
if (payload.id === undefined) {
|
if (payload.id === undefined) {
|
||||||
console.warn("Ignoring IPC reply with no ID");
|
logger.warn("Ignoring IPC reply with no ID");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.pendingIpcCalls[payload.id] === undefined) {
|
if (this.pendingIpcCalls[payload.id] === undefined) {
|
||||||
console.warn("Unknown IPC payload ID: " + payload.id);
|
logger.warn("Unknown IPC payload ID: " + payload.id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue