Merge pull request #3450 from antobinary/nginx-logging3
Add an i18n agnostic field for client logging
This commit is contained in:
commit
99a2d239d7
@ -149,7 +149,6 @@ package org.bigbluebutton.core.managers
|
|||||||
LOGGER.info(JSON.stringify(logData));
|
LOGGER.info(JSON.stringify(logData));
|
||||||
|
|
||||||
dispatchReconnectionSucceededEvent(type);
|
dispatchReconnectionSucceededEvent(type);
|
||||||
|
|
||||||
delete _connections[type];
|
delete _connections[type];
|
||||||
if (type == BIGBLUEBUTTON_CONNECTION) {
|
if (type == BIGBLUEBUTTON_CONNECTION) {
|
||||||
reconnect();
|
reconnect();
|
||||||
@ -161,7 +160,7 @@ package org.bigbluebutton.core.managers
|
|||||||
|
|
||||||
_dispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.SUCCESS_MESSAGE_EVENT,
|
_dispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.SUCCESS_MESSAGE_EVENT,
|
||||||
ResourceUtil.getInstance().getString('bbb.connection.reestablished'),
|
ResourceUtil.getInstance().getString('bbb.connection.reestablished'),
|
||||||
msg));
|
msg, 'bbb.connection.reestablished'));
|
||||||
|
|
||||||
_reconnectTimeout.reset();
|
_reconnectTimeout.reset();
|
||||||
removePopUp();
|
removePopUp();
|
||||||
|
@ -29,12 +29,14 @@ package org.bigbluebutton.main.events
|
|||||||
|
|
||||||
public var title:String;
|
public var title:String;
|
||||||
public var message:String;
|
public var message:String;
|
||||||
|
public var logCode:String;
|
||||||
|
|
||||||
public function ClientStatusEvent(type:String, title:String, message:String)
|
public function ClientStatusEvent(type:String, title:String, message:String, logCode:String)
|
||||||
{
|
{
|
||||||
super(type);
|
super(type);
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.message = message;
|
this.message = message;
|
||||||
|
this.logCode = logCode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,6 +11,7 @@ terms of the GNU Lesser General Public License as published by the Free Software
|
|||||||
Foundation; either version 3.0 of the License, or (at your option) any later
|
Foundation; either version 3.0 of the License, or (at your option) any later
|
||||||
version.
|
version.
|
||||||
|
|
||||||
|
|
||||||
BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
@ -318,7 +319,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
// this is a terrible place for these checks because this function runs 4 times on startup
|
// this is a terrible place for these checks because this function runs 4 times on startup
|
||||||
if (BBB.initConnectionManager().isTunnelling) {
|
if (BBB.initConnectionManager().isTunnelling) {
|
||||||
isTunneling = true;
|
isTunneling = true;
|
||||||
globalDispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.WARNING_MESSAGE_EVENT, ResourceUtil.getInstance().getString("bbb.clientstatus.tunneling.title"), ResourceUtil.getInstance().getString("bbb.clientstatus.tunneling.message")));
|
globalDispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.WARNING_MESSAGE_EVENT,
|
||||||
|
ResourceUtil.getInstance().getString("bbb.clientstatus.tunneling.title"),
|
||||||
|
ResourceUtil.getInstance().getString("bbb.clientstatus.tunneling.message"),
|
||||||
|
'bbb.clientstatus.tunneling'));
|
||||||
}
|
}
|
||||||
versionCheck();
|
versionCheck();
|
||||||
|
|
||||||
@ -340,7 +344,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
if ((browserVersion[0].toString().toLowerCase() == "chrome" && browserVersion[1] < xml.@chrome) || browserVersion[0].toString().toLowerCase() == "firefox" && browserVersion[1] < xml.@firefox) {
|
if ((browserVersion[0].toString().toLowerCase() == "chrome" && browserVersion[1] < xml.@chrome) || browserVersion[0].toString().toLowerCase() == "firefox" && browserVersion[1] < xml.@firefox) {
|
||||||
globalDispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.WARNING_MESSAGE_EVENT,
|
globalDispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.WARNING_MESSAGE_EVENT,
|
||||||
ResourceUtil.getInstance().getString("bbb.clientstatus.browser.title"),
|
ResourceUtil.getInstance().getString("bbb.clientstatus.browser.title"),
|
||||||
ResourceUtil.getInstance().getString("bbb.clientstatus.browser.message", [browserVersion[0]+" "+browserVersion[1]])));
|
ResourceUtil.getInstance().getString("bbb.clientstatus.browser.message", [browserVersion[0]+" "+browserVersion[1]]),
|
||||||
|
'bbb.clientstatus.browser.message'));
|
||||||
}
|
}
|
||||||
|
|
||||||
//find flash version
|
//find flash version
|
||||||
@ -350,7 +355,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
((flashVersion.os != 'LNX' || browserVersion[0].toString().toLowerCase() == "chrome") && flashVersion.major < xml.@flash)) {
|
((flashVersion.os != 'LNX' || browserVersion[0].toString().toLowerCase() == "chrome") && flashVersion.major < xml.@flash)) {
|
||||||
globalDispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.WARNING_MESSAGE_EVENT,
|
globalDispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.WARNING_MESSAGE_EVENT,
|
||||||
ResourceUtil.getInstance().getString("bbb.clientstatus.flash.title"),
|
ResourceUtil.getInstance().getString("bbb.clientstatus.flash.title"),
|
||||||
ResourceUtil.getInstance().getString("bbb.clientstatus.flash.message", [flashVersion.major+"."+flashVersion.minor+"."+flashVersion.build])));
|
ResourceUtil.getInstance().getString("bbb.clientstatus.flash.message", [flashVersion.major+"."+flashVersion.minor+"."+flashVersion.build]),
|
||||||
|
'bbb.clientstatus.flash.message'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,13 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
messages.push(obj);
|
messages.push(obj);
|
||||||
showNotification();
|
showNotification();
|
||||||
LOGGER.warn("ClientNotification:" + e.title + " " + e.message);
|
|
||||||
|
var logData:Object = {};
|
||||||
|
logData.type = "ClientNotification";
|
||||||
|
logData.logCode = e.logCode;
|
||||||
|
logData.message = e.message;
|
||||||
|
logData.title = e.title;
|
||||||
|
LOGGER.warn(JSON.stringify(logData));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function showNotification():void {
|
private function showNotification():void {
|
||||||
@ -102,7 +108,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
visible = includeInLayout = true;
|
visible = includeInLayout = true;
|
||||||
|
|
||||||
if (hideTimer.running) hideTimer.reset();
|
if (hideTimer.running) hideTimer.reset();
|
||||||
hideTimer.start()
|
hideTimer.start();
|
||||||
|
|
||||||
if (!notification) {
|
if (!notification) {
|
||||||
notification = ToolTipManager.createToolTip(ResourceUtil.getInstance().getString("bbb.clientstatus.notification"), 100, 100, "errorTipAbove", this) as ToolTip;
|
notification = ToolTipManager.createToolTip(ResourceUtil.getInstance().getString("bbb.clientstatus.notification"), 100, 100, "errorTipAbove", this) as ToolTip;
|
||||||
|
@ -14,7 +14,6 @@ package org.bigbluebutton.modules.phone.managers
|
|||||||
import org.as3commons.logging.util.jsonXify;
|
import org.as3commons.logging.util.jsonXify;
|
||||||
import org.bigbluebutton.core.UsersUtil;
|
import org.bigbluebutton.core.UsersUtil;
|
||||||
import org.bigbluebutton.main.api.JSAPI;
|
import org.bigbluebutton.main.api.JSAPI;
|
||||||
import org.bigbluebutton.main.api.JSLog;
|
|
||||||
import org.bigbluebutton.main.events.ClientStatusEvent;
|
import org.bigbluebutton.main.events.ClientStatusEvent;
|
||||||
import org.bigbluebutton.main.model.users.AutoReconnect;
|
import org.bigbluebutton.main.model.users.AutoReconnect;
|
||||||
import org.bigbluebutton.modules.phone.PhoneModel;
|
import org.bigbluebutton.modules.phone.PhoneModel;
|
||||||
@ -60,7 +59,8 @@ package org.bigbluebutton.modules.phone.managers
|
|||||||
if (options.useWebRTCIfAvailable && !isWebRTCSupported()) {
|
if (options.useWebRTCIfAvailable && !isWebRTCSupported()) {
|
||||||
dispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.WARNING_MESSAGE_EVENT,
|
dispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.WARNING_MESSAGE_EVENT,
|
||||||
ResourceUtil.getInstance().getString("bbb.clientstatus.webrtc.title"),
|
ResourceUtil.getInstance().getString("bbb.clientstatus.webrtc.title"),
|
||||||
ResourceUtil.getInstance().getString("bbb.clientstatus.webrtc.message")));
|
ResourceUtil.getInstance().getString("bbb.clientstatus.webrtc.message"),
|
||||||
|
'bbb.clientstatus.webrtc.title'));
|
||||||
}
|
}
|
||||||
|
|
||||||
usingWebRTC = checkIfToUseWebRTC();
|
usingWebRTC = checkIfToUseWebRTC();
|
||||||
@ -135,7 +135,8 @@ package org.bigbluebutton.modules.phone.managers
|
|||||||
if(reconnecting) {
|
if(reconnecting) {
|
||||||
dispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.SUCCESS_MESSAGE_EVENT,
|
dispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.SUCCESS_MESSAGE_EVENT,
|
||||||
ResourceUtil.getInstance().getString("bbb.webrtcWarning.connection.reestablished"),
|
ResourceUtil.getInstance().getString("bbb.webrtcWarning.connection.reestablished"),
|
||||||
ResourceUtil.getInstance().getString("bbb.webrtcWarning.connection.reestablished")));
|
ResourceUtil.getInstance().getString("bbb.webrtcWarning.connection.reestablished"),
|
||||||
|
'bbb.webrtcWarning.connection.reestablished'));
|
||||||
reconnecting = false;
|
reconnecting = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -150,7 +151,11 @@ package org.bigbluebutton.modules.phone.managers
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function handleJoinVoiceConferenceCommand(event:JoinVoiceConferenceCommand):void {
|
public function handleJoinVoiceConferenceCommand(event:JoinVoiceConferenceCommand):void {
|
||||||
LOGGER.debug("handleJoinVoiceConferenceCommand - usingWebRTC: " + usingWebRTC + ", event.mic: " + event.mic);
|
var logData:Object = UsersUtil.initLogData();
|
||||||
|
logData.usingWebRTC = usingWebRTC;
|
||||||
|
logData.eventMic = event.mic;
|
||||||
|
logData.message = "handleJoinVoiceConferenceCommand - usingWebRTC:";
|
||||||
|
LOGGER.info(JSON.stringify(logData));
|
||||||
|
|
||||||
if (!usingWebRTC || !event.mic) return;
|
if (!usingWebRTC || !event.mic) return;
|
||||||
|
|
||||||
@ -204,14 +209,19 @@ package org.bigbluebutton.modules.phone.managers
|
|||||||
logData.user.reason = errorString;
|
logData.user.reason = errorString;
|
||||||
logData.tags = ["voice", "webrtc"];
|
logData.tags = ["voice", "webrtc"];
|
||||||
logData.message = "WebRtc Echo test failed.";
|
logData.message = "WebRtc Echo test failed.";
|
||||||
|
logData.errorEvent = event;
|
||||||
LOGGER.info(jsonXify(logData));
|
LOGGER.info(jsonXify(logData));
|
||||||
|
|
||||||
sendWebRTCAlert(ResourceUtil.getInstance().getString("bbb.webrtcWarning.title"), ResourceUtil.getInstance().getString("bbb.webrtcWarning.message", [errorString]), errorString);
|
sendWebRTCAlert(ResourceUtil.getInstance().getString("bbb.webrtcWarning.title"),
|
||||||
|
ResourceUtil.getInstance().getString("bbb.webrtcWarning.message", [errorString]),
|
||||||
|
errorString,
|
||||||
|
'bbb.webrtcWarning webRTCEchoTestFailedEvent');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handleWebRTCEchoTestEndedUnexpectedly():void {
|
public function handleWebRTCEchoTestEndedUnexpectedly():void {
|
||||||
model.state = Constants.INITED;
|
model.state = Constants.INITED;
|
||||||
var errorString:String = ResourceUtil.getInstance().getString("bbb.webrtcWarning.failedError.endedunexpectedly");
|
var logCode:String = "bbb.webrtcWarning.failedError.endedunexpectedly";
|
||||||
|
var errorString:String = ResourceUtil.getInstance().getString(logCode);
|
||||||
|
|
||||||
var logData:Object = UsersUtil.initLogData();
|
var logData:Object = UsersUtil.initLogData();
|
||||||
logData.user.reason = errorString;
|
logData.user.reason = errorString;
|
||||||
@ -219,7 +229,10 @@ package org.bigbluebutton.modules.phone.managers
|
|||||||
logData.message = "WebRtc Echo test ended unexpectedly.";
|
logData.message = "WebRtc Echo test ended unexpectedly.";
|
||||||
LOGGER.info(jsonXify(logData));
|
LOGGER.info(jsonXify(logData));
|
||||||
|
|
||||||
sendWebRTCAlert(ResourceUtil.getInstance().getString("bbb.webrtcWarning.title"), ResourceUtil.getInstance().getString("bbb.webrtcWarning.message", [errorString]), errorString);
|
sendWebRTCAlert(ResourceUtil.getInstance().getString("bbb.webrtcWarning.title"),
|
||||||
|
ResourceUtil.getInstance().getString("bbb.webrtcWarning.message", [errorString]),
|
||||||
|
errorString,
|
||||||
|
logCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handleWebRTCCallFailedEvent(event:WebRTCCallEvent):void {
|
public function handleWebRTCCallFailedEvent(event:WebRTCCallEvent):void {
|
||||||
@ -231,7 +244,8 @@ package org.bigbluebutton.modules.phone.managers
|
|||||||
reconnecting = true;
|
reconnecting = true;
|
||||||
dispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.WARNING_MESSAGE_EVENT,
|
dispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.WARNING_MESSAGE_EVENT,
|
||||||
ResourceUtil.getInstance().getString("bbb.webrtcWarning.connection.dropped"),
|
ResourceUtil.getInstance().getString("bbb.webrtcWarning.connection.dropped"),
|
||||||
ResourceUtil.getInstance().getString("bbb.webrtcWarning.connection.reconnecting")));
|
ResourceUtil.getInstance().getString("bbb.webrtcWarning.connection.reconnecting"),
|
||||||
|
'bbb.webrtcWarning.connection.dropped,reconnecting'));
|
||||||
reconnect.onDisconnect(joinVoiceConference, []);
|
reconnect.onDisconnect(joinVoiceConference, []);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -256,23 +270,30 @@ package org.bigbluebutton.modules.phone.managers
|
|||||||
|
|
||||||
var logData:Object = UsersUtil.initLogData();
|
var logData:Object = UsersUtil.initLogData();
|
||||||
logData.tags = ["voice", "webrtc"];
|
logData.tags = ["voice", "webrtc"];
|
||||||
logData.user.reason = errorString;
|
logData.errorEvent = event;
|
||||||
LOGGER.info(jsonXify(logData));
|
LOGGER.info(jsonXify(logData));
|
||||||
|
|
||||||
sendWebRTCAlert(ResourceUtil.getInstance().getString("bbb.webrtcWarning.title"), ResourceUtil.getInstance().getString("bbb.webrtcWarning.message", [errorString]), errorString);
|
sendWebRTCAlert(ResourceUtil.getInstance().getString("bbb.webrtcWarning.title"),
|
||||||
|
ResourceUtil.getInstance().getString("bbb.webrtcWarning.message", [errorString]),
|
||||||
|
errorString,
|
||||||
|
'bbb.webrtcWarning.failedError');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handleWebRTCMediaFailedEvent():void {
|
public function handleWebRTCMediaFailedEvent():void {
|
||||||
model.state = Constants.INITED;
|
model.state = Constants.INITED;
|
||||||
var errorString:String = ResourceUtil.getInstance().getString("bbb.webrtcWarning.failedError.mediamissing");
|
var logCode:String = "bbb.webrtcWarning.failedError.mediamissing";
|
||||||
|
var errorString:String = ResourceUtil.getInstance().getString(logCode);
|
||||||
|
|
||||||
var logData:Object = UsersUtil.initLogData();
|
var logData:Object = UsersUtil.initLogData();
|
||||||
logData.user.reason = errorString;
|
logData.user.reason = errorString;
|
||||||
LOGGER.info(jsonXify(logData));
|
LOGGER.info(jsonXify(logData));
|
||||||
|
|
||||||
sendWebRTCAlert(ResourceUtil.getInstance().getString("bbb.webrtcWarning.title"), ResourceUtil.getInstance().getString("bbb.webrtcWarning.message", [errorString]), errorString);
|
sendWebRTCAlert(ResourceUtil.getInstance().getString("bbb.webrtcWarning.title"),
|
||||||
|
ResourceUtil.getInstance().getString("bbb.webrtcWarning.message", [errorString]),
|
||||||
|
errorString,
|
||||||
|
logCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
private var popUpDelayTimer:Timer = new Timer(100, 1);
|
private var popUpDelayTimer:Timer = new Timer(100, 1);
|
||||||
@ -294,7 +315,7 @@ package org.bigbluebutton.modules.phone.managers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function sendWebRTCAlert(title:String, message:String, error:String):void {
|
private function sendWebRTCAlert(title:String, message:String, error:String, logCode:String):void {
|
||||||
/**
|
/**
|
||||||
* There is a bug in Flex SDK 4.14 where the screen stays blurry if a
|
* There is a bug in Flex SDK 4.14 where the screen stays blurry if a
|
||||||
* pop-up is opened from another pop-up. I delayed the second open to
|
* pop-up is opened from another pop-up. I delayed the second open to
|
||||||
@ -305,9 +326,15 @@ package org.bigbluebutton.modules.phone.managers
|
|||||||
Alert.show(message, title, Alert.YES | Alert.NO, null, handleCallFailedUserResponse, null, Alert.YES);
|
Alert.show(message, title, Alert.YES | Alert.NO, null, handleCallFailedUserResponse, null, Alert.YES);
|
||||||
});
|
});
|
||||||
popUpDelayTimer.start();
|
popUpDelayTimer.start();
|
||||||
dispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.FAIL_MESSAGE_EVENT, title, error));
|
dispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.FAIL_MESSAGE_EVENT, title, error, logCode));
|
||||||
|
|
||||||
LOGGER.warn("WebRTCAlert:" + title + " " + error + " " + message);
|
var logData:Object = UsersUtil.initLogData();
|
||||||
|
logData.type = "WebRTCAlert";
|
||||||
|
logData.title = title;
|
||||||
|
logData.error = error;
|
||||||
|
logData.message = message;
|
||||||
|
logData.logCode = logCode;
|
||||||
|
LOGGER.warn(JSON.stringify(logData));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -168,6 +168,12 @@ package org.bigbluebutton.modules.screenshare.services.red5
|
|||||||
private function netStatusHandler(event:NetStatusEvent):void {
|
private function netStatusHandler(event:NetStatusEvent):void {
|
||||||
LOGGER.debug("Connected to [" + getURI() + "]. [" + event.info.code + "]");
|
LOGGER.debug("Connected to [" + getURI() + "]. [" + event.info.code + "]");
|
||||||
|
|
||||||
|
var logData:Object = {};
|
||||||
|
logData.type = "ConnectionStatusChanged";
|
||||||
|
logData.newStatus = event.info.code;
|
||||||
|
logData.connection = getURI();
|
||||||
|
LOGGER.info(JSON.stringify(logData));
|
||||||
|
|
||||||
if (retryTimer) {
|
if (retryTimer) {
|
||||||
retryCount = 0;
|
retryCount = 0;
|
||||||
LOGGER.debug("Cancelling retry timer.");
|
LOGGER.debug("Cancelling retry timer.");
|
||||||
@ -257,7 +263,8 @@ package org.bigbluebutton.modules.screenshare.services.red5
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "NetConnection.Connect.NetworkChange":
|
case "NetConnection.Connect.NetworkChange":
|
||||||
LOGGER.info("Detected network change. User might be on a wireless and temporarily dropped connection. Doing nothing. Just making a note.");
|
// LOGGER.info("Detected network change. User might be on a wireless and
|
||||||
|
// temporarily dropped connection. Doing nothing. Just making a note.");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
|
Loading…
Reference in New Issue
Block a user