Use console.log in place of console.warn for less warnings

These aren't react warnings, but they are distracting in the logs.
pull/21833/head
Travis Ralston 2020-04-01 13:59:48 -06:00
parent c0ffa8b59a
commit ba0a9c8439
4 changed files with 8 additions and 8 deletions

View File

@ -165,7 +165,7 @@ export default class FromWidgetPostMessageApi {
const action = event.data.action; const action = event.data.action;
const widgetId = event.data.widgetId; const widgetId = event.data.widgetId;
if (action === 'content_loaded') { if (action === 'content_loaded') {
console.warn('Widget reported content loaded for', widgetId); console.log('Widget reported content loaded for', widgetId);
dis.dispatch({ dis.dispatch({
action: 'widget_content_loaded', action: 'widget_content_loaded',
widgetId: widgetId, widgetId: widgetId,

View File

@ -92,7 +92,7 @@ export default class WidgetMessaging {
* @return {Promise} To be resolved with screenshot data when it has been generated * @return {Promise} To be resolved with screenshot data when it has been generated
*/ */
getScreenshot() { getScreenshot() {
console.warn('Requesting screenshot for', this.widgetId); console.log('Requesting screenshot for', this.widgetId);
return this.messageToWidget({ return this.messageToWidget({
api: OUTBOUND_API_NAME, api: OUTBOUND_API_NAME,
action: "screenshot", action: "screenshot",
@ -106,12 +106,12 @@ export default class WidgetMessaging {
* @return {Promise} To be resolved with an array of requested widget capabilities * @return {Promise} To be resolved with an array of requested widget capabilities
*/ */
getCapabilities() { getCapabilities() {
console.warn('Requesting capabilities for', this.widgetId); console.log('Requesting capabilities for', this.widgetId);
return this.messageToWidget({ return this.messageToWidget({
api: OUTBOUND_API_NAME, api: OUTBOUND_API_NAME,
action: "capabilities", action: "capabilities",
}).then((response) => { }).then((response) => {
console.warn('Got capabilities for', this.widgetId, response.capabilities); console.log('Got capabilities for', this.widgetId, response.capabilities);
return response.capabilities; return response.capabilities;
}); });
} }

View File

@ -319,7 +319,7 @@ export default class AppTile extends React.Component {
} }
_onSnapshotClick() { _onSnapshotClick() {
console.warn("Requesting widget snapshot"); console.log("Requesting widget snapshot");
ActiveWidgetStore.getWidgetMessaging(this.props.app.id).getScreenshot() ActiveWidgetStore.getWidgetMessaging(this.props.app.id).getScreenshot()
.catch((err) => { .catch((err) => {
console.error("Failed to get screenshot", err); console.error("Failed to get screenshot", err);
@ -423,7 +423,7 @@ export default class AppTile extends React.Component {
}, this.props.whitelistCapabilities); }, this.props.whitelistCapabilities);
if (requestedWhitelistCapabilies.length > 0 ) { if (requestedWhitelistCapabilies.length > 0 ) {
console.warn(`Widget ${this.props.app.id} allowing requested, whitelisted properties: ` + console.log(`Widget ${this.props.app.id} allowing requested, whitelisted properties: ` +
requestedWhitelistCapabilies, requestedWhitelistCapabilies,
); );
} }

View File

@ -84,11 +84,11 @@ export default class Stickerpicker extends React.Component {
async _removeStickerpickerWidgets() { async _removeStickerpickerWidgets() {
const scalarClient = await this._acquireScalarClient(); const scalarClient = await this._acquireScalarClient();
console.warn('Removing Stickerpicker widgets'); console.log('Removing Stickerpicker widgets');
if (this.state.widgetId) { if (this.state.widgetId) {
if (scalarClient) { if (scalarClient) {
scalarClient.disableWidgetAssets(widgetType, this.state.widgetId).then(() => { scalarClient.disableWidgetAssets(widgetType, this.state.widgetId).then(() => {
console.warn('Assets disabled'); console.log('Assets disabled');
}).catch((err) => { }).catch((err) => {
console.error('Failed to disable assets'); console.error('Failed to disable assets');
}); });