Merge pull request #3336 from ritzalam/cleanup-client-logging
- allow logging of some events
This commit is contained in:
commit
ae2540ddfb
@ -76,7 +76,6 @@ package org.bigbluebutton.core.managers
|
||||
}
|
||||
|
||||
private function timeout(e:TimerEvent = null):void {
|
||||
LOGGER.debug("timeout");
|
||||
_dispatcher.dispatchEvent(new BBBEvent(BBBEvent.CANCEL_RECONNECTION_EVENT));
|
||||
_dispatcher.dispatchEvent(new LogoutEvent(LogoutEvent.USER_LOGGED_OUT));
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ package org.bigbluebutton.main.model.users
|
||||
private var _bwMon:BandwidthMonitor = new BandwidthMonitor();
|
||||
|
||||
private function startMonitoringBandwidth():void {
|
||||
LOGGER.info("Start monitoring bandwidth.");
|
||||
LOGGER.debug("Start monitoring bandwidth.");
|
||||
var pattern:RegExp = /(?P<protocol>.+):\/\/(?P<server>.+)\/(?P<app>.+)/;
|
||||
var result:Array = pattern.exec(_applicationURI);
|
||||
_bwMon.serverURL = result.server;
|
||||
@ -402,44 +402,49 @@ package org.bigbluebutton.main.model.users
|
||||
sendConnectionFailedEvent(ConnectionFailedEvent.UNKNOWN_REASON);
|
||||
}
|
||||
|
||||
private function sendConnectionFailedEvent(reason:String):void{
|
||||
var logData:Object = new Object();
|
||||
private function sendConnectionFailedEvent(reason:String):void{
|
||||
var logData:Object = new Object();
|
||||
|
||||
if (this.logoutOnUserCommand) {
|
||||
logData.reason = "User requested.";
|
||||
logData.user = UsersUtil.getUserData();
|
||||
JSLog.debug("User logged out from BBB App.", logData);
|
||||
sendUserLoggedOutEvent();
|
||||
} else if (reason == ConnectionFailedEvent.CONNECTION_CLOSED && !UsersUtil.isUserEjected()) {
|
||||
// do not try to reconnect if the connection failed is different than CONNECTION_CLOSED
|
||||
logData.reason = reason;
|
||||
logData.user = UsersUtil.getUserData();
|
||||
JSLog.warn("User disconnected from BBB App.", logData);
|
||||
if (this.logoutOnUserCommand) {
|
||||
logData.reason = "User requested.";
|
||||
logData.user = UsersUtil.getUserData();
|
||||
logData.message = "User logged out from BBB App.";
|
||||
LOGGER.info(JSON.stringify(logData));
|
||||
|
||||
if (reconnecting) {
|
||||
var attemptFailedEvent:BBBEvent = new BBBEvent(BBBEvent.RECONNECT_CONNECTION_ATTEMPT_FAILED_EVENT);
|
||||
attemptFailedEvent.payload.type = ReconnectionManager.BIGBLUEBUTTON_CONNECTION;
|
||||
dispatcher.dispatchEvent(attemptFailedEvent);
|
||||
} else {
|
||||
reconnecting = true;
|
||||
authenticated = false;
|
||||
sendUserLoggedOutEvent();
|
||||
} else if (reason == ConnectionFailedEvent.CONNECTION_CLOSED && !UsersUtil.isUserEjected()) {
|
||||
// do not try to reconnect if the connection failed is different than CONNECTION_CLOSED
|
||||
logData.reason = reason;
|
||||
logData.user = UsersUtil.getUserData();
|
||||
logData.message = "User disconnected from BBB App.";
|
||||
LOGGER.info(JSON.stringify(logData));
|
||||
|
||||
var disconnectedEvent:BBBEvent = new BBBEvent(BBBEvent.RECONNECT_DISCONNECTED_EVENT);
|
||||
disconnectedEvent.payload.type = ReconnectionManager.BIGBLUEBUTTON_CONNECTION;
|
||||
disconnectedEvent.payload.callback = connect;
|
||||
disconnectedEvent.payload.callbackParameters = new Array(_conferenceParameters, tried_tunneling);
|
||||
dispatcher.dispatchEvent(disconnectedEvent);
|
||||
if (reconnecting) {
|
||||
var attemptFailedEvent:BBBEvent = new BBBEvent(BBBEvent.RECONNECT_CONNECTION_ATTEMPT_FAILED_EVENT);
|
||||
attemptFailedEvent.payload.type = ReconnectionManager.BIGBLUEBUTTON_CONNECTION;
|
||||
dispatcher.dispatchEvent(attemptFailedEvent);
|
||||
} else {
|
||||
reconnecting = true;
|
||||
authenticated = false;
|
||||
|
||||
var disconnectedEvent:BBBEvent = new BBBEvent(BBBEvent.RECONNECT_DISCONNECTED_EVENT);
|
||||
disconnectedEvent.payload.type = ReconnectionManager.BIGBLUEBUTTON_CONNECTION;
|
||||
disconnectedEvent.payload.callback = connect;
|
||||
disconnectedEvent.payload.callbackParameters = new Array(_conferenceParameters, tried_tunneling);
|
||||
dispatcher.dispatchEvent(disconnectedEvent);
|
||||
}
|
||||
} else {
|
||||
if (UsersUtil.isUserEjected()) {
|
||||
logData.user = UsersUtil.getUserData();
|
||||
logData.message = "User has been ejected from meeting.";
|
||||
LOGGER.info(JSON.stringify(logData));
|
||||
reason = ConnectionFailedEvent.USER_EJECTED_FROM_MEETING;
|
||||
}
|
||||
LOGGER.debug("Connection failed event - " + reason);
|
||||
var e:ConnectionFailedEvent = new ConnectionFailedEvent(reason);
|
||||
dispatcher.dispatchEvent(e);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (UsersUtil.isUserEjected()) {
|
||||
LOGGER.debug("User has been ejected from meeting.");
|
||||
reason = ConnectionFailedEvent.USER_EJECTED_FROM_MEETING;
|
||||
}
|
||||
LOGGER.debug("Connection failed event - " + reason);
|
||||
var e:ConnectionFailedEvent = new ConnectionFailedEvent(reason);
|
||||
dispatcher.dispatchEvent(e);
|
||||
}
|
||||
}
|
||||
|
||||
private function sendUserLoggedOutEvent():void{
|
||||
var e:ConnectionFailedEvent = new ConnectionFailedEvent(ConnectionFailedEvent.USER_LOGGED_OUT);
|
||||
|
@ -99,13 +99,17 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
private function yesButtonClicked():void {
|
||||
userClosed = true;
|
||||
LOGGER.debug("Echo test passed.");
|
||||
|
||||
|
||||
var logData:Object = new Object();
|
||||
logData.reason = "User requested.";
|
||||
logData.user = UsersUtil.getUserData();
|
||||
logData.message = "WebRtc Echo test passed.";
|
||||
|
||||
JSLog.info("WebRtc Echo test passed.", logData);
|
||||
|
||||
LOGGER.info(JSON.stringify(logData));
|
||||
|
||||
setCurrentState("connecting");
|
||||
lblConnectMessage.text = lblConnectMessageMock.text = ResourceUtil.getInstance().getString('bbb.micSettings.webrtc.endingecho');
|
||||
|
||||
@ -115,7 +119,13 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
private function noButtonClicked():void {
|
||||
userClosed = true;
|
||||
LOGGER.warn("Echo test failed.");
|
||||
|
||||
var logData:Object = new Object();
|
||||
logData.reason = "User requested.";
|
||||
logData.user = UsersUtil.getUserData();
|
||||
logData.message = "WebRtc Echo test failed.";
|
||||
|
||||
LOGGER.info(JSON.stringify(logData));
|
||||
|
||||
var dispatcher:Dispatcher = new Dispatcher();
|
||||
dispatcher.dispatchEvent(new WebRTCEchoTestEvent(WebRTCEchoTestEvent.WEBRTC_ECHO_TEST_NO_AUDIO));
|
||||
@ -123,7 +133,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
private function handleWebRTCEchoTestStartedEvent(e:WebRTCEchoTestStartedEvent):void {
|
||||
webRTCEchoTestStarted();
|
||||
webRTCEchoTestStarted();
|
||||
}
|
||||
|
||||
private function webRTCEchoTestStarted():void {
|
||||
@ -183,7 +193,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
var logData:Object = new Object();
|
||||
logData.reason = "User requested.";
|
||||
logData.user = UsersUtil.getUserData();
|
||||
JSLog.info("WebRtc call started.", logData);
|
||||
logData.message = "WebRtc call started.";
|
||||
|
||||
LOGGER.info(JSON.stringify(logData));
|
||||
|
||||
onCancelClicked();
|
||||
}
|
||||
|
@ -203,6 +203,7 @@ package org.bigbluebutton.modules.phone.managers
|
||||
var logData:Object = new Object();
|
||||
logData.user = UsersUtil.getUserData();
|
||||
logData.user.reason = errorString;
|
||||
logData.message = "WebRtc Echo test failed.";
|
||||
JSLog.warn("WebRtc Echo test failed.", logData);
|
||||
|
||||
LOGGER.info(jsonXify(logData));
|
||||
@ -217,6 +218,7 @@ package org.bigbluebutton.modules.phone.managers
|
||||
var logData:Object = new Object();
|
||||
logData.user = UsersUtil.getUserData();
|
||||
logData.user.reason = errorString;
|
||||
logData.message = "WebRtc Echo test ended unexpectedly.";
|
||||
LOGGER.info(jsonXify(logData));
|
||||
|
||||
sendWebRTCAlert(ResourceUtil.getInstance().getString("bbb.webrtcWarning.title"), ResourceUtil.getInstance().getString("bbb.webrtcWarning.message", [errorString]), errorString);
|
||||
|
9
bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as
Normal file → Executable file
9
bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as
Normal file → Executable file
@ -175,8 +175,8 @@ package org.bigbluebutton.modules.users.services
|
||||
|
||||
private function handleDeskShareRTMPBroadcastNotification(msg:Object):void {
|
||||
LOGGER.debug("*** handleDeskShareRTMPBroadcastNotification **** \n", [msg]);
|
||||
JSLog.warn("*** handleDeskShareRTMPBroadcastNotification **** url=", msg.rtmpUrl);
|
||||
JSLog.warn("*** handleDeskShareRTMPBroadcastNotification **** broadcasting=", msg.broadcasting);
|
||||
LOGGER.debug("*** handleDeskShareRTMPBroadcastNotification **** url=", msg.rtmpUrl);
|
||||
LOGGER.debug("*** handleDeskShareRTMPBroadcastNotification **** broadcasting=", msg.broadcasting);
|
||||
|
||||
var event:WebRTCViewStreamEvent;
|
||||
if (msg.broadcasting) {
|
||||
@ -597,7 +597,10 @@ package org.bigbluebutton.modules.users.services
|
||||
user.userLocked = joinedUser.locked;
|
||||
user.avatarURL = joinedUser.avatarURL;
|
||||
|
||||
LOGGER.info("User joined = " + JSON.stringify(user));
|
||||
var logData:Object = new Object();
|
||||
logData.user = user;
|
||||
logData.message = "User joined.";
|
||||
LOGGER.info(JSON.stringify(logData));
|
||||
|
||||
UserManager.getInstance().getConference().addUser(user);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user