how does logging work on BBB?

498 views
Skip to first unread message

Roger

unread,
Sep 28, 2016, 2:42:15 PM9/28/16
to BigBlueButton-dev
Could someone please tell me, how does the logging work?  For example,

private static const LOGGER:ILogger = getClassLogger(UsersWindow);      

Then in a function,

LOGGER.debug("test message");

So far I have been running BigBlueButton, and searching the log files, but haven't found any "test message."  Could you please tell me, where do these log messages go?  How do I configure logging to turn on the debug messages?  So far I have checked out various websites, like https://code.google.com/archive/p/as3-commons and http://www.slideshare.net/herrodius/as3-commons-augbe but it is still not clear to me.  Do you have any resources to suggest how to best learn about as3-commons?  TIA.

Chad Pilkey

unread,
Sep 28, 2016, 4:08:01 PM9/28/16
to BigBlueButton-dev
The client logging is configured by the following line in config.xml, https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-client/resources/config.xml.template#L19.

That line in the XML is read by LogUtil.as (https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-client/src/org/bigbluebutton/common/LogUtil.as).

By default it logs to "trace" which is the default debugger output for Flash Player. You could change it to "jsnlog" or "logwindow" if you don't have a trace viewer running. You would also need to change the level from "info" to "debug" to see the debug outputs.

After you've made your changes to config.xml make sure to rebuild and restart tomcat to clear the cached version of config.xml.

Roger

unread,
Sep 28, 2016, 9:09:13 PM9/28/16
to BigBlueButton-dev
OK, great, thank you!  Please note that I am developing on Linux.  I have installed this debugger for Firefox: https://addons.mozilla.org/en-us/firefox/addon/flash-debugger/

The problem is that it requires me to also install the Adobe Flash debugger, but this debugger only works on Windows or Mac OSX:  https://helpx.adobe.com/flash-player/kb/enable-flash-player-content-debugger-in-google-chrome.html

It does say I can install the flash debugger on Linux, but the instructions as far as I can tell use RPM files which is for Red Hat Linux (see readme):  https://www.adobe.com/support/flashplayer/debug_downloads.html

So my question is, since I haven't been able to get the Flash Debugger Firefox or Google Chrome extensions working, how can I view what the log messages are?  Please see the attached screen shot which indicates on Linux that I must have Adobe Flash Debugger installed before the Firefox Flash Debugger extension will work.  How do I open this logwindow or jsnlog?  TIA.
FlashDebuggerRegion.png

Chad Pilkey

unread,
Sep 29, 2016, 1:05:27 PM9/29/16
to BigBlueButton-dev
jsnlog sends the logs to the browser console. The log window is a window internal to the client and the button to open is made visible when the "showLogButton" flag is flipped, https://github.com/bigbluebutton/bigbluebutton/blob/v1.0.x-release/bigbluebutton-client/resources/config.xml.template#L14

Also the Flash Player debug download page (https://www.adobe.com/support/flashplayer/debug_downloads.html) has a link labelled "Download the Flash Player 11.2 Plugin content debugger" under the Linux section that has you download a tarball. There's also no debugger for Chrome because they only accept Pepper Flash (developed by Google) and they don't release a debugger version for it

Roger

unread,
Sep 29, 2016, 10:41:07 PM9/29/16
to BigBlueButton-dev
OK, thank you.  I installed the flash player plugin content debugger, and turned on the "showLogButton" but I don't see any extra button added after I login to the client through a web browser.  Also, when I open a session, I see this as the output, but I don't see any "test message":

404 Not Found
7ms
jquery-...VERSION (line 16)
BigBlueButton SWF is ready.
bbb_api...VERSION (line 596)
Successfully connected on test connection. {"meetingId":"a1d63a1fb90b422ecce953b3302b6e521f96df8c-1475109145620","protocol":"RTMP","app":"video/portTest","meetingName":"BigBlueButton","userId":"2enq0dnc04v8_1","server":"10.0.2.15","port":":1935","username":"Roger"}
bbblogg...VERSION (line 23)
Successfully connected to BBB App. {"user":{"userId":"2enq0dnc04v8_2","username":"Roger","meetingId":"a1d63a1fb90b422ecce953b3302b6e521f96df8c-1475109145620","meetingName":"BigBlueButton","externalMeetingId":"BigBlueButton"}}
bbblogg...VERSION (line 23)
Received [UserJoinedEvent]
bbb_api...VERSION (line 567)
No listeners for [UserJoinedEvent]
bbb_api...VERSION (line 543)
Received [SwitchedPresenterEvent]
bbb_api...VERSION (line 567)
No listeners for [SwitchedPresenterEvent]
bbb_api...VERSION (line 543)
Received [NewRoleEvent]
bbb_api...VERSION (line 567)
No listeners for [NewRoleEvent]
bbb_api...VERSION (line 543)
Received [UserJoinedEvent]
bbb_api...VERSION (line 567)
No listeners for [UserJoinedEvent]
bbb_api...VERSION (line 543)
Received [SwitchedLayoutEvent]
bbb_api...VERSION (line 567)
No listeners for [SwitchedLayoutEvent]
bbb_api...VERSION (line 543)
Successfully connected to BBB Voice {"user":{"userId":"2enq0dnc04v8_2","username":"Roger","meetingId":"a1d63a1fb90b422ecce953b3302b6e521f96df8c-1475109145620","meetingName":"BigBlueButton","externalMeetingId":"BigBlueButton"}}
bbblogg...VERSION (line 23)
Successfully connected to the listen only stream. {"user":{"userId":"2enq0dnc04v8_2","username":"Roger","meetingId":"a1d63a1fb90b422ecce953b3302b6e521f96df8c-1475109145620","meetingName":"BigBlueButton","externalMeetingId":"BigBlueButton"}}

Do you have any suggestions?  Please note again that the full code listings are here with my modifications: https://github.com/john1726/bigbluebutton-client

Chad Pilkey

unread,
Sep 30, 2016, 3:45:07 PM9/30/16
to BigBlueButton-dev
Are you editing the config.xml.template file or the actual config.xml file (bigbluebutton-client/src/conf/config.xml)? The target needs to be "logwindow" too.

Do you see the expected values when you go to "<server>/bigbluebutton/api/configXML"?

Roger

unread,
Oct 1, 2016, 12:45:51 PM10/1/16
to BigBlueButton-dev
Thank you.  I updated the config.xml instead of config.xml.template file.   I have updated the target to logwindow in ~/src/config/config.xml to be logwindow.  Still I don't see any new button.  Please find below the full text from
~/src/config/confnig.xml, but I don't see any log button. following also is the full text from LogUril.as, which I believe should be clearly set to logwindow instead of trace:

<?xml version="1.0" ?>
<config>
    <localeversion suppressWarning="false">0.9.0</localeversion>
    <version>VERSION</version>
    <help url="http://10.0.2.15/help.html"/>
    <javaTest url="http://10.0.2.15/testjava.html"/>
    <porttest host="10.0.2.15" application="video/portTest" timeout="10000"/>   
    <bwMon server="10.0.2.15" application="video/bwTest"/>
    <application uri="rtmp://10.0.2.15/bigbluebutton" host="http://10.0.2.15/bigbluebutton/api/enter"/>
    <language userSelectionEnabled="true" />
    <skinning enabled="true" url="http://10.0.2.15/client/branding/css/BBBDefault.css.swf" />
    <shortcutKeys showButton="true" />
    <browserVersions chrome="CHROME_VERSION" firefox="FIREFOX_VERSION" flash="FLASH_VERSION" java="1.7.0_51" />
    <layout showLogButton="true" defaultLayout="bbb.layout.name.defaultlayout"
            showToolbar="true" showFooter="true" showMeetingName="true" showHelpButton="true"
            showLogoutWindow="true" showLayoutTools="true" confirmLogout="true"
            showRecordingNotification="true"/>
    <meeting muteOnStart="false" />
    <logging enabled="true" target="trace" level="debug" format="{dateUTC} {time} :: {name} :: [{logLevel}] {message}" uri="http://10.0.2.15"/>
    <lock disableCamForLockedUsers="false" disableMicForLockedUsers="false" disablePrivateChatForLockedUsers="false"
          disablePublicChatForLockedUsers="false" lockLayoutForLockedUsers="false" lockOnJoin="true" lockOnJoinConfigurable="false"/>
           
        <modules>
         
        <module name="ChatModule" url="http://10.0.2.15/client/ChatModule.swf?v=VERSION"
            uri="rtmp://10.0.2.15/bigbluebutton"
            dependsOn="UsersModule"   
            privateEnabled="true" 
            fontSize="12"
            position="top-right"
            baseTabIndex="701"
            colorPickerIsVisible="false"
            maxMessageLength="1024"
        />

        <module name="UsersModule" url="http://10.0.2.15/client/UsersModule.swf?v=VERSION"
            uri="rtmp://10.0.2.15/bigbluebutton"
            allowKickUser="true"
            enableEmojiStatus="true"
            enableSettingsButton="true"
            baseTabIndex="301"
        />

        <module name="TimerModule" url="http://10.0.2.15/client/TimerModule.swf?v=VERSION"
            uri="rtmp://10.0.2.15/bigbluebutton"
            baseTabIndex="101"
        />
       
        <module name="DeskShareModule"
            url="http://10.0.2.15/client/DeskShareModule.swf?v=VERSION"
            uri="rtmp://10.0.2.15/deskShare"
            publishURI="10.0.2.15"
            useTLS="false"
            showButton="true"
            autoStart="false"
            autoFullScreen="false"
            baseTabIndex="201"
        />
       
        <module name="PhoneModule" url="http://10.0.2.15/client/PhoneModule.swf?v=VERSION"
            uri="rtmp://10.0.2.15/sip"
            autoJoin="true"
            listenOnlyMode="true"
            presenterShareOnly="false"
            skipCheck="false"
            showButton="true"
            enabledEchoCancel="true"
            useWebRTCIfAvailable="true"
            showPhoneOption="false"
            echoTestApp="9196"
            dependsOn="UsersModule"
        />

        <module name="VideoconfModule" url="http://10.0.2.15/client/VideoconfModule.swf?v=VERSION"
            uri="rtmp://10.0.2.15/video"
            dependson = "UsersModule"
            baseTabIndex="401"
            presenterShareOnly = "false"
            controlsForPresenter = "false"
            autoStart = "false"
            skipCamSettingsCheck="false"
            showButton = "true"
            showCloseButton = "true"
            publishWindowVisible = "true"
            viewerWindowMaxed = "false"
            viewerWindowLocation = "top"
            smoothVideo="false"
            applyConvolutionFilter="false"
            convolutionFilter="-1, 0, -1, 0, 6, 0, -1, 0, -1"
            filterBias="0"
            filterDivisor="4"
            displayAvatar = "false"
            focusTalking = "false"
            glowColor = "0x4A931D"
            glowBlurSize = "30.0"
            priorityRatio = "0.67"
        />
       
        <module name="WhiteboardModule" url="http://10.0.2.15/client/WhiteboardModule.swf?v=VERSION"
            uri="rtmp://10.0.2.15/bigbluebutton"
            dependsOn="PresentModule"
            baseTabIndex="601"
            whiteboardAccess="presenter"
            keepToolbarVisible="false"
        />
       
        <module name="PollingModule" url="http://10.0.2.15/client/PollingModule.swf?v=VERSION"
            uri="rtmp://10.0.2.15/bigbluebutton"
            dependsOn="PresentModule"
        />
       
        <module name="PresentModule" url="http://10.0.2.15/client/PresentModule.swf?v=VERSION"
            uri="rtmp://10.0.2.15/bigbluebutton"
            host="http://10.0.2.15"
            showPresentWindow="true"
            showWindowControls="true"
            openExternalFileUploadDialog="false"
            dependsOn="UsersModule"
            baseTabIndex="501"
            maxFileSize="30"
        />

        <module name="LayoutModule" url="http://10.0.2.15/client/LayoutModule.swf?v=VERSION"
            uri="rtmp://10.0.2.15/bigbluebutton"
            layoutConfig="http://10.0.2.15/client/conf/layout.xml"
            enableEdit="false"
        />

<!--
    <module name="NotesModule" url="http://10.0.2.15/client/NotesModule.swf?v=VERSION"
      saveURL="http://10.0.2.15"
      position="top-left"
    />
   
    <module name="BroadcastModule" url="http://10.0.2.15/client/BroadcastModule.swf?v=VERSION"
      uri="rtmp://10.0.2.15/bigbluebutton"
      streamsUri="http://10.0.2.15/streams.xml"
      position="top-left"
      showStreams="true"
      autoPlay="false"
      dependsOn="UsersModule"
    />
-->
           
    </modules>
</config>

LogUtil.as:
/**
 * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
 *
 * Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
 *
 * This program is free software; you can redistribute it and/or modify it under the
 * 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
 * version.
 *
 * 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
 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along
 * with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
 *
 */
package org.bigbluebutton.common {
   
    import org.as3commons.logging.api.LOGGER_FACTORY;
    import org.as3commons.logging.setup.LevelTargetSetup;
    import org.as3commons.logging.setup.LogSetupLevel;
    import org.as3commons.logging.setup.target.IFormattingLogTarget;
    import org.as3commons.logging.setup.target.TraceTarget;
    import org.bigbluebutton.core.BBB;
    import org.bigbluebutton.util.logging.JSNLogTarget;
    import org.bigbluebutton.util.logging.LogWindowTarget;
    import org.bigbluebutton.util.logging.ServerLogTarget;
   
    /**
     * The logging can be configured in config.xml. The <logging> tag can be configured like the following
     *
     * <logging enabled="true" target="trace" level="info" uri="http://HOST"/>
     * - enabled : true or false
     * - target  : + trace     : write logs using trace function
     *             + logwindow : write logs in LogWindow view
     *             + server    : send logs to the server
     *             + jsnlog    : uses jsnlog javascript library (experimental)
     * - level   : none|fatal_only|fatal|error_only|error|warn_only|warn|info_only|info|debug_only|debug|all
     *             for more information about "level" please check the org.as3commons.logging.setup.LogSetupLevel class
     * - format  : + {date}       : The date in the format YYYY/MM/DD
     *             + {dateUTC}    : he UTC date in the format YYYY/MM/DD
     *             + {gmt}        : The time offset of the statement to the Greenwich mean time in the format GMT+9999
     *             + {logLevel}   : The level of the log statement (example: DEBUG)
     *             + {logTime}    : The UTC time in the format HH:MM:SS.0MS
     *             + {message}    : The message of the logger
     *             + {message_dqt}: The message of the logger, double quote escaped.
     *             + {name}       : The name of the logger
     *             + {time}       : The time in the format H:M:S.MS
     *             + {timeUTC}    : The UTC time in the format H:M:S.MS
     *             + {shortName}  : The short name of the logger
     *             + {shortSWF}   : The SWF file name
     *             + {swf}        : The full SWF path
     *             + {person}     : The Person that wrote this statement
     *             + {atPerson}   : he Person that wrote this statement with the 'at' prefix
     * - uri     : HOST will contain the URL of the logging server
     */
    public class LogUtil {
        public static const TRACE:String = "jsnlog";
       
        public static const LOG_WINDOW:String = "logwindow";
       
        public static const SERVER:String = "server";
       
        public static const JSNLOG:String = "jsnlog";
       
        private static const DEFAULT_FORMAT:String = "{dateUTC} {time} :: {name} :: [{logLevel}] {message}";
       
        private static var loggingEnabled:Boolean;
       
        /* private static var logLevel:String = "info"; */
        private static var logLevel:String = "debug";
       
        private static var loggingTargetName:String = "logwindow"; /* "trace"; */
       
        /**
         * Initialises logging from the application configuration.
         */
        public static function initLogging(force:Boolean = false):void {
            var logTarget:IFormattingLogTarget;
            var logFormat:String = DEFAULT_FORMAT;
            if (force) {
                logTarget = new TraceTarget();
            } else {
                var lxml:XML = BBB.initConfigManager().config.logging;
                if (lxml.@enabled != undefined) {
                    loggingEnabled = (lxml.@enabled.toString().toUpperCase() == "TRUE") ? true : false;
                }
                if (lxml.@target != undefined) {
                    loggingTargetName = lxml.@target.toString().toLowerCase();
                }
                if (lxml.@level != undefined) {
                    logLevel = String(lxml.@level).toUpperCase();
                }
                if (lxml.@format != undefined) {
                    logFormat = lxml.@format.toString();
                }
                if (loggingEnabled) {
                    switch (loggingTargetName) {
                        case TRACE:
                            logTarget = new TraceTarget();
                            break;
                        case LOG_WINDOW:
                            logTarget = new LogWindowTarget();
                            break;
                        case SERVER:
                            logTarget = new ServerLogTarget(String(lxml.@uri));
                            break;
                        case JSNLOG:
                            logTarget = new JSNLogTarget();
                            break;
                        default:
                            // no logging target set                       
                            break;
                    }
                }
            }
            if (logTarget) {
                logTarget.format = logFormat;
                LOGGER_FACTORY.setup = new LevelTargetSetup(logTarget, LogSetupLevel[logLevel.toUpperCase()]);
            } else {
                disableLogging();
            }
        }
       
        /**
         * Disables logging across the applicatio.
         */
        public static function disableLogging():void {
            LOGGER_FACTORY.setup = null;

Roger

unread,
Oct 1, 2016, 1:16:51 PM10/1/16
to BigBlueButton-dev
Here is a  screenshot, where I don't see any log button.


On Wednesday, September 28, 2016 at 12:42:15 PM UTC-6, Roger wrote:
NoLogButton.png

Roger Moore

unread,
Oct 1, 2016, 2:33:36 PM10/1/16
to bigblueb...@googlegroups.com
Please note that I am using the following rebuild command.  Am I missing something important?  TIA.


$ ant clean-build-all

--
You received this message because you are subscribed to a topic in the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bigbluebutton-dev/UZ9BYdv-IkQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bigbluebutton-dev+unsubscribe@googlegroups.com.
To post to this group, send email to bigbluebutton-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/bigbluebutton-dev.
For more options, visit https://groups.google.com/d/optout.

Roger Moore

unread,
Oct 1, 2016, 2:37:20 PM10/1/16
to bigblueb...@googlegroups.com
Also, I have clearly changed the following in LogUtil.as, so I'm not sure what I am missing. TIA.

private static var loggingTargetName:String = "logwindow"; /* "trace"; */

Roger

unread,
Oct 2, 2016, 12:29:06 AM10/2/16
to BigBlueButton-dev
It turns out I didn't get that ILogger working, but I did eventually get jslog working.  Thank you.

                            var logData:Object = new Object();       
                            JSLog.debug("stopTimer()", logData);
Reply all
Reply to author
Forward
0 new messages