History

Merge branch 'master' into menu-updates

vladest committed 8 years ago

Commit be22f492 parents 3296ae0 1e25d4860 files · +1005 −1040Browse files

Showing the changes to interface/src/Application.cpp (1 of 60 files). Show all

Unified · Split

interface/src/Application.cpp+52−1
@@ -145,6 +145,16 @@ · 144 unmodified lines
145145 #include <avatars-renderer/ScriptAvatar.h>
146146 #include <RenderableEntityItem.h>
147147
148+#include <AnimationLogging.h>
149+#include <AvatarLogging.h>
150+#include <ScriptEngineLogging.h>
151+#include <ModelFormatLogging.h>
152+#include <controllers/Logging.h>
153+#include <NetworkLogging.h>
154+#include <shared/StorageLogging.h>
155+#include <ScriptEngineLogging.h>
156+#include <ui/Logging.h>
157+
148158 #include "AudioClient.h"
149159 #include "audio/AudioScope.h"
150160 #include "avatar/AvatarManager.h"
@@ -1306,6 +1316,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1155 unmodified lines
13061316 // Needs to happen AFTER the render engine initialization to access its configuration
13071317 initializeUi();
13081318
1319+ updateVerboseLogging();
1320+
13091321 init();
13101322 qCDebug(interfaceapp, "init() complete.");
13111323
@@ -2174,6 +2186,46 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 862 unmodified lines
21742186 qCDebug(interfaceapp) << "Metaverse session ID is" << uuidStringWithoutCurlyBraces(accountManager->getSessionID());
21752187 }
21762188
2189+void Application::updateVerboseLogging() {
2190+ bool enable = Menu::getInstance()->isOptionChecked(MenuOption::VerboseLogging);
2191+
2192+ const_cast<QLoggingCategory*>(&animation())->setEnabled(QtDebugMsg, enable);
2193+ const_cast<QLoggingCategory*>(&animation())->setEnabled(QtInfoMsg, enable);
2194+
2195+ const_cast<QLoggingCategory*>(&avatars())->setEnabled(QtDebugMsg, enable);
2196+ const_cast<QLoggingCategory*>(&avatars())->setEnabled(QtInfoMsg, enable);
2197+
2198+ const_cast<QLoggingCategory*>(&scriptengine())->setEnabled(QtDebugMsg, enable);
2199+ const_cast<QLoggingCategory*>(&scriptengine())->setEnabled(QtInfoMsg, enable);
2200+
2201+ const_cast<QLoggingCategory*>(&modelformat())->setEnabled(QtDebugMsg, enable);
2202+ const_cast<QLoggingCategory*>(&modelformat())->setEnabled(QtInfoMsg, enable);
2203+
2204+ const_cast<QLoggingCategory*>(&controllers())->setEnabled(QtDebugMsg, enable);
2205+ const_cast<QLoggingCategory*>(&controllers())->setEnabled(QtInfoMsg, enable);
2206+
2207+ const_cast<QLoggingCategory*>(&resourceLog())->setEnabled(QtDebugMsg, enable);
2208+ const_cast<QLoggingCategory*>(&resourceLog())->setEnabled(QtInfoMsg, enable);
2209+
2210+ const_cast<QLoggingCategory*>(&networking())->setEnabled(QtDebugMsg, enable);
2211+ const_cast<QLoggingCategory*>(&networking())->setEnabled(QtInfoMsg, enable);
2212+
2213+ const_cast<QLoggingCategory*>(&asset_client())->setEnabled(QtDebugMsg, enable);
2214+ const_cast<QLoggingCategory*>(&asset_client())->setEnabled(QtInfoMsg, enable);
2215+
2216+ const_cast<QLoggingCategory*>(&messages_client())->setEnabled(QtDebugMsg, enable);
2217+ const_cast<QLoggingCategory*>(&messages_client())->setEnabled(QtInfoMsg, enable);
2218+
2219+ const_cast<QLoggingCategory*>(&storagelogging())->setEnabled(QtDebugMsg, enable);
2220+ const_cast<QLoggingCategory*>(&storagelogging())->setEnabled(QtInfoMsg, enable);
2221+
2222+ const_cast<QLoggingCategory*>(&uiLogging())->setEnabled(QtDebugMsg, enable);
2223+ const_cast<QLoggingCategory*>(&uiLogging())->setEnabled(QtInfoMsg, enable);
2224+
2225+ const_cast<QLoggingCategory*>(&glLogging())->setEnabled(QtDebugMsg, enable);
2226+ const_cast<QLoggingCategory*>(&glLogging())->setEnabled(QtInfoMsg, enable);
2227+}
2228+
21772229 void Application::domainConnectionRefused(const QString& reasonMessage, int reasonCodeInt, const QString& extraInfo) {
21782230 DomainHandler::ConnectionRefusedReason reasonCode = static_cast<DomainHandler::ConnectionRefusedReason>(reasonCodeInt);
21792231
@@ -3042,7 +3094,6 @@ void Application::handleSandboxStatus(QNetworkReply* reply) { · 862 unmodified lines
30423094 PROFILE_RANGE(render, __FUNCTION__);
30433095
30443096 bool sandboxIsRunning = SandboxUtils::readStatus(reply->readAll());
3045− qDebug() << "HandleSandboxStatus" << sandboxIsRunning;
30463097
30473098 enum HandControllerType {
30483099 Vive,