Merge pull request #3671 from matrix-org/matthew/fix_logging
console.log doesn't take %s substitutions
This commit is contained in:
commit
46846fcfd0
9 changed files with 12 additions and 12 deletions
|
@ -335,7 +335,7 @@ function _onAction(payload) {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
} else if (members.length === 2) {
|
} else if (members.length === 2) {
|
||||||
console.log("Place %s call in %s", payload.type, payload.room_id);
|
console.info("Place %s call in %s", payload.type, payload.room_id);
|
||||||
const call = Matrix.createNewMatrixCall(MatrixClientPeg.get(), payload.room_id);
|
const call = Matrix.createNewMatrixCall(MatrixClientPeg.get(), payload.room_id);
|
||||||
placeCall(call);
|
placeCall(call);
|
||||||
} else { // > 2
|
} else { // > 2
|
||||||
|
@ -350,7 +350,7 @@ function _onAction(payload) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'place_conference_call':
|
case 'place_conference_call':
|
||||||
console.log("Place conference call in %s", payload.room_id);
|
console.info("Place conference call in %s", payload.room_id);
|
||||||
_startCallApp(payload.room_id, payload.type);
|
_startCallApp(payload.room_id, payload.type);
|
||||||
break;
|
break;
|
||||||
case 'incoming_call':
|
case 'incoming_call':
|
||||||
|
|
|
@ -96,7 +96,7 @@ class Presence {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await MatrixClientPeg.get().setPresence(this.state);
|
await MatrixClientPeg.get().setPresence(this.state);
|
||||||
console.log("Presence: %s", newState);
|
console.info("Presence: %s", newState);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Failed to set presence: %s", err);
|
console.error("Failed to set presence: %s", err);
|
||||||
this.state = oldState;
|
this.state = oldState;
|
||||||
|
|
|
@ -1309,7 +1309,7 @@ export default createReactClass({
|
||||||
if (state === "SYNCING" && prevState === "SYNCING") {
|
if (state === "SYNCING" && prevState === "SYNCING") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log("MatrixClient sync state => %s", state);
|
console.info("MatrixClient sync state => %s", state);
|
||||||
if (state !== "PREPARED") { return; }
|
if (state !== "PREPARED") { return; }
|
||||||
|
|
||||||
self.firstSyncComplete = true;
|
self.firstSyncComplete = true;
|
||||||
|
|
|
@ -357,7 +357,7 @@ module.exports = createReactClass({
|
||||||
if (this.props.autoJoin) {
|
if (this.props.autoJoin) {
|
||||||
this.onJoinButtonClicked();
|
this.onJoinButtonClicked();
|
||||||
} else if (!room && shouldPeek) {
|
} else if (!room && shouldPeek) {
|
||||||
console.log("Attempting to peek into room %s", roomId);
|
console.info("Attempting to peek into room %s", roomId);
|
||||||
this.setState({
|
this.setState({
|
||||||
peekLoading: true,
|
peekLoading: true,
|
||||||
isPeeking: true, // this will change to false if peeking fails
|
isPeeking: true, // this will change to false if peeking fails
|
||||||
|
@ -1896,7 +1896,7 @@ module.exports = createReactClass({
|
||||||
highlightedEventId = this.state.initialEventId;
|
highlightedEventId = this.state.initialEventId;
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log("ShowUrlPreview for %s is %s", this.state.room.roomId, this.state.showUrlPreview);
|
// console.info("ShowUrlPreview for %s is %s", this.state.room.roomId, this.state.showUrlPreview);
|
||||||
const messagePanel = (
|
const messagePanel = (
|
||||||
<TimelinePanel ref={this._gatherTimelinePanelRef}
|
<TimelinePanel ref={this._gatherTimelinePanelRef}
|
||||||
timelineSet={this.state.room.getUnfilteredTimelineSet()}
|
timelineSet={this.state.room.getUnfilteredTimelineSet()}
|
||||||
|
|
|
@ -89,7 +89,7 @@ module.exports = createReactClass({
|
||||||
+ "authentication");
|
+ "authentication");
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Rendering to %s", divId);
|
console.info("Rendering to %s", divId);
|
||||||
this._captchaWidgetId = global.grecaptcha.render(divId, {
|
this._captchaWidgetId = global.grecaptcha.render(divId, {
|
||||||
sitekey: publicKey,
|
sitekey: publicKey,
|
||||||
callback: this.props.onCaptchaResponse,
|
callback: this.props.onCaptchaResponse,
|
||||||
|
|
|
@ -362,7 +362,7 @@ export default class AppTile extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
_onRevokeClicked() {
|
_onRevokeClicked() {
|
||||||
console.log("Revoke widget permissions - %s", this.props.id);
|
console.info("Revoke widget permissions - %s", this.props.id);
|
||||||
this._revokeWidgetPermission();
|
this._revokeWidgetPermission();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ module.exports = createReactClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
shouldComponentUpdate: function(nextProps, nextState) {
|
shouldComponentUpdate: function(nextProps, nextState) {
|
||||||
//console.log("shouldComponentUpdate: ShowUrlPreview for %s is %s", this.props.mxEvent.getId(), this.props.showUrlPreview);
|
//console.info("shouldComponentUpdate: ShowUrlPreview for %s is %s", this.props.mxEvent.getId(), this.props.showUrlPreview);
|
||||||
|
|
||||||
// exploit that events are immutable :)
|
// exploit that events are immutable :)
|
||||||
return (nextProps.mxEvent.getId() !== this.props.mxEvent.getId() ||
|
return (nextProps.mxEvent.getId() !== this.props.mxEvent.getId() ||
|
||||||
|
@ -159,7 +159,7 @@ module.exports = createReactClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
calculateUrlPreview: function() {
|
calculateUrlPreview: function() {
|
||||||
//console.log("calculateUrlPreview: ShowUrlPreview for %s is %s", this.props.mxEvent.getId(), this.props.showUrlPreview);
|
//console.info("calculateUrlPreview: ShowUrlPreview for %s is %s", this.props.mxEvent.getId(), this.props.showUrlPreview);
|
||||||
|
|
||||||
if (this.props.showUrlPreview) {
|
if (this.props.showUrlPreview) {
|
||||||
let links = this.findLinks(this.refs.content.children);
|
let links = this.findLinks(this.refs.content.children);
|
||||||
|
|
|
@ -548,7 +548,7 @@ module.exports = createReactClass({
|
||||||
const SenderProfile = sdk.getComponent('messages.SenderProfile');
|
const SenderProfile = sdk.getComponent('messages.SenderProfile');
|
||||||
const MemberAvatar = sdk.getComponent('avatars.MemberAvatar');
|
const MemberAvatar = sdk.getComponent('avatars.MemberAvatar');
|
||||||
|
|
||||||
//console.log("EventTile showUrlPreview for %s is %s", this.props.mxEvent.getId(), this.props.showUrlPreview);
|
//console.info("EventTile showUrlPreview for %s is %s", this.props.mxEvent.getId(), this.props.showUrlPreview);
|
||||||
|
|
||||||
const content = this.props.mxEvent.getContent();
|
const content = this.props.mxEvent.getContent();
|
||||||
const msgtype = content.msgtype;
|
const msgtype = content.msgtype;
|
||||||
|
|
|
@ -698,7 +698,7 @@ module.exports = createReactClass({
|
||||||
|
|
||||||
const canAffectUser = them.powerLevel < me.powerLevel || isMe;
|
const canAffectUser = them.powerLevel < me.powerLevel || isMe;
|
||||||
if (!canAffectUser) {
|
if (!canAffectUser) {
|
||||||
//console.log("Cannot affect user: %s >= %s", them.powerLevel, me.powerLevel);
|
//console.info("Cannot affect user: %s >= %s", them.powerLevel, me.powerLevel);
|
||||||
return can;
|
return can;
|
||||||
}
|
}
|
||||||
const editPowerLevel = (
|
const editPowerLevel = (
|
||||||
|
|
Loading…
Reference in a new issue