mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 23:14:34 +02:00
more suppression of logging
This commit is contained in:
parent
b9656e5c72
commit
7466d08f1f
6 changed files with 47 additions and 10 deletions
|
@ -154,6 +154,13 @@
|
||||||
#include <shared/StorageLogging.h>
|
#include <shared/StorageLogging.h>
|
||||||
#include <ScriptEngineLogging.h>
|
#include <ScriptEngineLogging.h>
|
||||||
#include <ui/Logging.h>
|
#include <ui/Logging.h>
|
||||||
|
#include <SharedLogging.h>
|
||||||
|
#include <plugins/PluginLogging.h>
|
||||||
|
#include <gpu/GPULogging.h>
|
||||||
|
#include <ScriptEngineLogging.h>
|
||||||
|
#include <gpu/gl/GLShared.h>
|
||||||
|
#include <qml/Logging.h>
|
||||||
|
#include <EntitiesLogging.h>
|
||||||
|
|
||||||
#include "AudioClient.h"
|
#include "AudioClient.h"
|
||||||
#include "audio/AudioScope.h"
|
#include "audio/AudioScope.h"
|
||||||
|
@ -1372,8 +1379,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
// Needs to happen AFTER the render engine initialization to access its configuration
|
// Needs to happen AFTER the render engine initialization to access its configuration
|
||||||
initializeUi();
|
initializeUi();
|
||||||
|
|
||||||
updateVerboseLogging();
|
|
||||||
|
|
||||||
init();
|
init();
|
||||||
qCDebug(interfaceapp, "init() complete.");
|
qCDebug(interfaceapp, "init() complete.");
|
||||||
|
|
||||||
|
@ -1713,6 +1718,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
|
updateVerboseLogging();
|
||||||
|
|
||||||
// Now that we've loaded the menu and thus switched to the previous display plugin
|
// Now that we've loaded the menu and thus switched to the previous display plugin
|
||||||
// we can unlock the desktop repositioning code, since all the positions will be
|
// we can unlock the desktop repositioning code, since all the positions will be
|
||||||
// relative to the desktop size for this plugin
|
// relative to the desktop size for this plugin
|
||||||
|
@ -2254,10 +2261,16 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
_pendingRenderEvent = false;
|
_pendingRenderEvent = false;
|
||||||
|
|
||||||
qCDebug(interfaceapp) << "Metaverse session ID is" << uuidStringWithoutCurlyBraces(accountManager->getSessionID());
|
qCDebug(interfaceapp) << "Metaverse session ID is" << uuidStringWithoutCurlyBraces(accountManager->getSessionID());
|
||||||
|
|
||||||
|
updateVerboseLogging();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::updateVerboseLogging() {
|
void Application::updateVerboseLogging() {
|
||||||
bool enable = Menu::getInstance()->isOptionChecked(MenuOption::VerboseLogging);
|
auto menu = Menu::getInstance();
|
||||||
|
if (!menu) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
bool enable = menu->isOptionChecked(MenuOption::VerboseLogging);
|
||||||
|
|
||||||
const_cast<QLoggingCategory*>(&animation())->setEnabled(QtDebugMsg, enable);
|
const_cast<QLoggingCategory*>(&animation())->setEnabled(QtDebugMsg, enable);
|
||||||
const_cast<QLoggingCategory*>(&animation())->setEnabled(QtInfoMsg, enable);
|
const_cast<QLoggingCategory*>(&animation())->setEnabled(QtInfoMsg, enable);
|
||||||
|
@ -2268,6 +2281,12 @@ void Application::updateVerboseLogging() {
|
||||||
const_cast<QLoggingCategory*>(&scriptengine())->setEnabled(QtDebugMsg, enable);
|
const_cast<QLoggingCategory*>(&scriptengine())->setEnabled(QtDebugMsg, enable);
|
||||||
const_cast<QLoggingCategory*>(&scriptengine())->setEnabled(QtInfoMsg, enable);
|
const_cast<QLoggingCategory*>(&scriptengine())->setEnabled(QtInfoMsg, enable);
|
||||||
|
|
||||||
|
const_cast<QLoggingCategory*>(&scriptengine_module())->setEnabled(QtDebugMsg, enable);
|
||||||
|
const_cast<QLoggingCategory*>(&scriptengine_module())->setEnabled(QtInfoMsg, enable);
|
||||||
|
|
||||||
|
const_cast<QLoggingCategory*>(&scriptengine_script())->setEnabled(QtDebugMsg, enable);
|
||||||
|
const_cast<QLoggingCategory*>(&scriptengine_script())->setEnabled(QtInfoMsg, enable);
|
||||||
|
|
||||||
const_cast<QLoggingCategory*>(&modelformat())->setEnabled(QtDebugMsg, enable);
|
const_cast<QLoggingCategory*>(&modelformat())->setEnabled(QtDebugMsg, enable);
|
||||||
const_cast<QLoggingCategory*>(&modelformat())->setEnabled(QtInfoMsg, enable);
|
const_cast<QLoggingCategory*>(&modelformat())->setEnabled(QtInfoMsg, enable);
|
||||||
|
|
||||||
|
@ -2294,6 +2313,24 @@ void Application::updateVerboseLogging() {
|
||||||
|
|
||||||
const_cast<QLoggingCategory*>(&glLogging())->setEnabled(QtDebugMsg, enable);
|
const_cast<QLoggingCategory*>(&glLogging())->setEnabled(QtDebugMsg, enable);
|
||||||
const_cast<QLoggingCategory*>(&glLogging())->setEnabled(QtInfoMsg, enable);
|
const_cast<QLoggingCategory*>(&glLogging())->setEnabled(QtInfoMsg, enable);
|
||||||
|
|
||||||
|
const_cast<QLoggingCategory*>(&shared())->setEnabled(QtDebugMsg, enable);
|
||||||
|
const_cast<QLoggingCategory*>(&shared())->setEnabled(QtInfoMsg, enable);
|
||||||
|
|
||||||
|
const_cast<QLoggingCategory*>(&plugins())->setEnabled(QtDebugMsg, enable);
|
||||||
|
const_cast<QLoggingCategory*>(&plugins())->setEnabled(QtInfoMsg, enable);
|
||||||
|
|
||||||
|
const_cast<QLoggingCategory*>(&gpulogging())->setEnabled(QtDebugMsg, enable);
|
||||||
|
const_cast<QLoggingCategory*>(&gpulogging())->setEnabled(QtInfoMsg, enable);
|
||||||
|
|
||||||
|
const_cast<QLoggingCategory*>(&gpugllogging())->setEnabled(QtDebugMsg, enable);
|
||||||
|
const_cast<QLoggingCategory*>(&gpugllogging())->setEnabled(QtInfoMsg, enable);
|
||||||
|
|
||||||
|
const_cast<QLoggingCategory*>(&qmlLogging())->setEnabled(QtDebugMsg, enable);
|
||||||
|
const_cast<QLoggingCategory*>(&qmlLogging())->setEnabled(QtInfoMsg, enable);
|
||||||
|
|
||||||
|
const_cast<QLoggingCategory*>(&entities())->setEnabled(QtDebugMsg, enable);
|
||||||
|
const_cast<QLoggingCategory*>(&entities())->setEnabled(QtInfoMsg, enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::domainConnectionRefused(const QString& reasonMessage, int reasonCodeInt, const QString& extraInfo) {
|
void Application::domainConnectionRefused(const QString& reasonMessage, int reasonCodeInt, const QString& extraInfo) {
|
||||||
|
|
|
@ -1070,7 +1070,7 @@ bool EntityItem::stepKinematicMotion(float timeElapsed) {
|
||||||
|
|
||||||
const float MAX_TIME_ELAPSED = 1.0f; // seconds
|
const float MAX_TIME_ELAPSED = 1.0f; // seconds
|
||||||
if (timeElapsed > MAX_TIME_ELAPSED) {
|
if (timeElapsed > MAX_TIME_ELAPSED) {
|
||||||
qCWarning(entities) << "kinematic timestep = " << timeElapsed << " truncated to " << MAX_TIME_ELAPSED;
|
qCDebug(entities) << "kinematic timestep = " << timeElapsed << " truncated to " << MAX_TIME_ELAPSED;
|
||||||
}
|
}
|
||||||
timeElapsed = glm::min(timeElapsed, MAX_TIME_ELAPSED);
|
timeElapsed = glm::min(timeElapsed, MAX_TIME_ELAPSED);
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef hifi_Controllers_Logging_h
|
#ifndef hifi_QML_Logging_h
|
||||||
#define hifi_Controllers_Logging_h
|
#define hifi_QML_Logging_h
|
||||||
|
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
|
|
||||||
|
|
|
@ -101,8 +101,6 @@ int functionSignatureMetaID = qRegisterMetaType<QScriptEngine::FunctionSignature
|
||||||
|
|
||||||
int scriptEnginePointerMetaID = qRegisterMetaType<ScriptEnginePointer>();
|
int scriptEnginePointerMetaID = qRegisterMetaType<ScriptEnginePointer>();
|
||||||
|
|
||||||
Q_LOGGING_CATEGORY(scriptengineScript, "hifi.scriptengine.script")
|
|
||||||
|
|
||||||
static QScriptValue debugPrint(QScriptContext* context, QScriptEngine* engine) {
|
static QScriptValue debugPrint(QScriptContext* context, QScriptEngine* engine) {
|
||||||
QString message = "";
|
QString message = "";
|
||||||
for (int i = 0; i < context->argumentCount(); i++) {
|
for (int i = 0; i < context->argumentCount(); i++) {
|
||||||
|
@ -115,9 +113,9 @@ static QScriptValue debugPrint(QScriptContext* context, QScriptEngine* engine) {
|
||||||
if (ScriptEngine *scriptEngine = qobject_cast<ScriptEngine*>(engine)) {
|
if (ScriptEngine *scriptEngine = qobject_cast<ScriptEngine*>(engine)) {
|
||||||
scriptEngine->print(message);
|
scriptEngine->print(message);
|
||||||
// prefix the script engine name to help disambiguate messages in the main debug log
|
// prefix the script engine name to help disambiguate messages in the main debug log
|
||||||
qCDebug(scriptengineScript, "[%s] %s", qUtf8Printable(scriptEngine->getFilename()), qUtf8Printable(message));
|
qCDebug(scriptengine_script, "[%s] %s", qUtf8Printable(scriptEngine->getFilename()), qUtf8Printable(message));
|
||||||
} else {
|
} else {
|
||||||
qCDebug(scriptengineScript, "%s", qUtf8Printable(message));
|
qCDebug(scriptengine_script, "%s", qUtf8Printable(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
return QScriptValue();
|
return QScriptValue();
|
||||||
|
|
|
@ -13,3 +13,4 @@
|
||||||
|
|
||||||
Q_LOGGING_CATEGORY(scriptengine, "hifi.scriptengine")
|
Q_LOGGING_CATEGORY(scriptengine, "hifi.scriptengine")
|
||||||
Q_LOGGING_CATEGORY(scriptengine_module, "hifi.scriptengine.module")
|
Q_LOGGING_CATEGORY(scriptengine_module, "hifi.scriptengine.module")
|
||||||
|
Q_LOGGING_CATEGORY(scriptengine_script, "hifi.scriptengine.script")
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
Q_DECLARE_LOGGING_CATEGORY(scriptengine)
|
Q_DECLARE_LOGGING_CATEGORY(scriptengine)
|
||||||
Q_DECLARE_LOGGING_CATEGORY(scriptengine_module)
|
Q_DECLARE_LOGGING_CATEGORY(scriptengine_module)
|
||||||
|
Q_DECLARE_LOGGING_CATEGORY(scriptengine_script)
|
||||||
|
|
||||||
#endif // hifi_ScriptEngineLogging_h
|
#endif // hifi_ScriptEngineLogging_h
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue