mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 17:41:12 +02:00
Merge pull request #8603 from sethalves/quiet-logging
categorize some qDebugs
This commit is contained in:
commit
41bbfcd578
26 changed files with 191 additions and 110 deletions
|
@ -154,7 +154,6 @@ ScrollingWindow {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.warn("Could not find tab for " + source);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +188,6 @@ ScrollingWindow {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.warn("Could not find free tab");
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,7 +214,6 @@ ScrollingWindow {
|
||||||
|
|
||||||
var existingTabIndex = findIndexForUrl(properties.source);
|
var existingTabIndex = findIndexForUrl(properties.source);
|
||||||
if (existingTabIndex >= 0) {
|
if (existingTabIndex >= 0) {
|
||||||
console.log("Existing tab " + existingTabIndex + " found with URL " + properties.source);
|
|
||||||
var tab = tabView.getTab(existingTabIndex);
|
var tab = tabView.getTab(existingTabIndex);
|
||||||
return tab.item;
|
return tab.item;
|
||||||
}
|
}
|
||||||
|
@ -239,16 +236,13 @@ ScrollingWindow {
|
||||||
var tab = tabView.getTab(freeTabIndex);
|
var tab = tabView.getTab(freeTabIndex);
|
||||||
tab.title = properties.title || "Unknown";
|
tab.title = properties.title || "Unknown";
|
||||||
tab.enabled = true;
|
tab.enabled = true;
|
||||||
console.log("New tab URL: " + properties.source)
|
|
||||||
tab.originalUrl = properties.source;
|
tab.originalUrl = properties.source;
|
||||||
|
|
||||||
var eventBridge = properties.eventBridge;
|
var eventBridge = properties.eventBridge;
|
||||||
console.log("Event bridge: " + eventBridge);
|
|
||||||
|
|
||||||
var result = tab.item;
|
var result = tab.item;
|
||||||
result.enabled = true;
|
result.enabled = true;
|
||||||
tabView.tabCount++;
|
tabView.tabCount++;
|
||||||
console.log("Setting event bridge: " + eventBridge);
|
|
||||||
result.eventBridgeWrapper.eventBridge = eventBridge;
|
result.eventBridgeWrapper.eventBridge = eventBridge;
|
||||||
result.url = properties.source;
|
result.url = properties.source;
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -44,7 +44,6 @@ Item {
|
||||||
webChannel.registeredObjects: [eventBridgeWrapper]
|
webChannel.registeredObjects: [eventBridgeWrapper]
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
console.log("Connecting JS messaging to Hifi Logging");
|
|
||||||
// Ensure the JS from the web-engine makes it to our logging
|
// Ensure the JS from the web-engine makes it to our logging
|
||||||
root.javaScriptConsoleMessage.connect(function(level, message, lineNumber, sourceID) {
|
root.javaScriptConsoleMessage.connect(function(level, message, lineNumber, sourceID) {
|
||||||
console.log("Web Entity JS message: " + sourceID + " " + lineNumber + " " + message);
|
console.log("Web Entity JS message: " + sourceID + " " + lineNumber + " " + message);
|
||||||
|
|
|
@ -264,7 +264,7 @@ public:
|
||||||
auto elapsedMovingAverage = _movingAverage.getAverage();
|
auto elapsedMovingAverage = _movingAverage.getAverage();
|
||||||
|
|
||||||
if (elapsedMovingAverage > _maxElapsedAverage) {
|
if (elapsedMovingAverage > _maxElapsedAverage) {
|
||||||
qDebug() << "DEADLOCK WATCHDOG WARNING:"
|
qCDebug(interfaceapp_deadlock) << "DEADLOCK WATCHDOG WARNING:"
|
||||||
<< "lastHeartbeatAge:" << lastHeartbeatAge
|
<< "lastHeartbeatAge:" << lastHeartbeatAge
|
||||||
<< "elapsedMovingAverage:" << elapsedMovingAverage
|
<< "elapsedMovingAverage:" << elapsedMovingAverage
|
||||||
<< "maxElapsed:" << _maxElapsed
|
<< "maxElapsed:" << _maxElapsed
|
||||||
|
@ -274,7 +274,7 @@ public:
|
||||||
_maxElapsedAverage = elapsedMovingAverage;
|
_maxElapsedAverage = elapsedMovingAverage;
|
||||||
}
|
}
|
||||||
if (lastHeartbeatAge > _maxElapsed) {
|
if (lastHeartbeatAge > _maxElapsed) {
|
||||||
qDebug() << "DEADLOCK WATCHDOG WARNING:"
|
qCDebug(interfaceapp_deadlock) << "DEADLOCK WATCHDOG WARNING:"
|
||||||
<< "lastHeartbeatAge:" << lastHeartbeatAge
|
<< "lastHeartbeatAge:" << lastHeartbeatAge
|
||||||
<< "elapsedMovingAverage:" << elapsedMovingAverage
|
<< "elapsedMovingAverage:" << elapsedMovingAverage
|
||||||
<< "PREVIOUS maxElapsed:" << _maxElapsed
|
<< "PREVIOUS maxElapsed:" << _maxElapsed
|
||||||
|
@ -284,7 +284,7 @@ public:
|
||||||
_maxElapsed = lastHeartbeatAge;
|
_maxElapsed = lastHeartbeatAge;
|
||||||
}
|
}
|
||||||
if (elapsedMovingAverage > WARNING_ELAPSED_HEARTBEAT) {
|
if (elapsedMovingAverage > WARNING_ELAPSED_HEARTBEAT) {
|
||||||
qDebug() << "DEADLOCK WATCHDOG WARNING:"
|
qCDebug(interfaceapp_deadlock) << "DEADLOCK WATCHDOG WARNING:"
|
||||||
<< "lastHeartbeatAge:" << lastHeartbeatAge
|
<< "lastHeartbeatAge:" << lastHeartbeatAge
|
||||||
<< "elapsedMovingAverage:" << elapsedMovingAverage << "** OVER EXPECTED VALUE **"
|
<< "elapsedMovingAverage:" << elapsedMovingAverage << "** OVER EXPECTED VALUE **"
|
||||||
<< "maxElapsed:" << _maxElapsed
|
<< "maxElapsed:" << _maxElapsed
|
||||||
|
@ -293,7 +293,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastHeartbeatAge > MAX_HEARTBEAT_AGE_USECS) {
|
if (lastHeartbeatAge > MAX_HEARTBEAT_AGE_USECS) {
|
||||||
qDebug() << "DEADLOCK DETECTED -- "
|
qCDebug(interfaceapp_deadlock) << "DEADLOCK DETECTED -- "
|
||||||
<< "lastHeartbeatAge:" << lastHeartbeatAge
|
<< "lastHeartbeatAge:" << lastHeartbeatAge
|
||||||
<< "[ lastHeartbeat :" << lastHeartbeat
|
<< "[ lastHeartbeat :" << lastHeartbeat
|
||||||
<< "now:" << now << " ]"
|
<< "now:" << now << " ]"
|
||||||
|
@ -2005,7 +2005,7 @@ void Application::resizeGL() {
|
||||||
static qreal lastDevicePixelRatio = 0;
|
static qreal lastDevicePixelRatio = 0;
|
||||||
qreal devicePixelRatio = _window->devicePixelRatio();
|
qreal devicePixelRatio = _window->devicePixelRatio();
|
||||||
if (offscreenUi->size() != fromGlm(uiSize) || devicePixelRatio != lastDevicePixelRatio) {
|
if (offscreenUi->size() != fromGlm(uiSize) || devicePixelRatio != lastDevicePixelRatio) {
|
||||||
qDebug() << "Device pixel ratio changed, triggering resize to " << uiSize;
|
qCDebug(interfaceapp) << "Device pixel ratio changed, triggering resize to " << uiSize;
|
||||||
offscreenUi->resize(fromGlm(uiSize), true);
|
offscreenUi->resize(fromGlm(uiSize), true);
|
||||||
_offscreenContext->makeCurrent();
|
_offscreenContext->makeCurrent();
|
||||||
lastDevicePixelRatio = devicePixelRatio;
|
lastDevicePixelRatio = devicePixelRatio;
|
||||||
|
@ -3260,17 +3260,17 @@ void Application::init() {
|
||||||
|
|
||||||
Setting::Handle<bool> firstRun { Settings::firstRun, true };
|
Setting::Handle<bool> firstRun { Settings::firstRun, true };
|
||||||
if (addressLookupString.isEmpty() && firstRun.get()) {
|
if (addressLookupString.isEmpty() && firstRun.get()) {
|
||||||
qDebug() << "First run and no URL passed... attempting to go to Home or Entry...";
|
qCDebug(interfaceapp) << "First run and no URL passed... attempting to go to Home or Entry...";
|
||||||
DependencyManager::get<AddressManager>()->ifLocalSandboxRunningElse([](){
|
DependencyManager::get<AddressManager>()->ifLocalSandboxRunningElse([](){
|
||||||
qDebug() << "Home sandbox appears to be running, going to Home.";
|
qCDebug(interfaceapp) << "Home sandbox appears to be running, going to Home.";
|
||||||
DependencyManager::get<AddressManager>()->goToLocalSandbox();
|
DependencyManager::get<AddressManager>()->goToLocalSandbox();
|
||||||
},
|
},
|
||||||
[](){
|
[](){
|
||||||
qDebug() << "Home sandbox does not appear to be running, going to Entry.";
|
qCDebug(interfaceapp) << "Home sandbox does not appear to be running, going to Entry.";
|
||||||
DependencyManager::get<AddressManager>()->goToEntry();
|
DependencyManager::get<AddressManager>()->goToEntry();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Not first run... going to" << qPrintable(addressLookupString.isEmpty() ? QString("previous location") : addressLookupString);
|
qCDebug(interfaceapp) << "Not first run... going to" << qPrintable(addressLookupString.isEmpty() ? QString("previous location") : addressLookupString);
|
||||||
DependencyManager::get<AddressManager>()->loadSettings(addressLookupString);
|
DependencyManager::get<AddressManager>()->loadSettings(addressLookupString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5617,7 +5617,7 @@ void Application::setActiveDisplayPlugin(const QString& pluginName) {
|
||||||
void Application::handleLocalServerConnection() const {
|
void Application::handleLocalServerConnection() const {
|
||||||
auto server = qobject_cast<QLocalServer*>(sender());
|
auto server = qobject_cast<QLocalServer*>(sender());
|
||||||
|
|
||||||
qDebug() << "Got connection on local server from additional instance - waiting for parameters";
|
qCDebug(interfaceapp) << "Got connection on local server from additional instance - waiting for parameters";
|
||||||
|
|
||||||
auto socket = server->nextPendingConnection();
|
auto socket = server->nextPendingConnection();
|
||||||
|
|
||||||
|
@ -5633,7 +5633,7 @@ void Application::readArgumentsFromLocalSocket() const {
|
||||||
auto message = socket->readAll();
|
auto message = socket->readAll();
|
||||||
socket->deleteLater();
|
socket->deleteLater();
|
||||||
|
|
||||||
qDebug() << "Read from connection: " << message;
|
qCDebug(interfaceapp) << "Read from connection: " << message;
|
||||||
|
|
||||||
// If we received a message, try to open it as a URL
|
// If we received a message, try to open it as a URL
|
||||||
if (message.length() > 0) {
|
if (message.length() > 0) {
|
||||||
|
@ -5735,8 +5735,8 @@ void Application::updateThreadPoolCount() const {
|
||||||
auto reservedThreads = UI_RESERVED_THREADS + OS_RESERVED_THREADS + _displayPlugin->getRequiredThreadCount();
|
auto reservedThreads = UI_RESERVED_THREADS + OS_RESERVED_THREADS + _displayPlugin->getRequiredThreadCount();
|
||||||
auto availableThreads = QThread::idealThreadCount() - reservedThreads;
|
auto availableThreads = QThread::idealThreadCount() - reservedThreads;
|
||||||
auto threadPoolSize = std::max(MIN_PROCESSING_THREAD_POOL_SIZE, availableThreads);
|
auto threadPoolSize = std::max(MIN_PROCESSING_THREAD_POOL_SIZE, availableThreads);
|
||||||
qDebug() << "Ideal Thread Count " << QThread::idealThreadCount();
|
qCDebug(interfaceapp) << "Ideal Thread Count " << QThread::idealThreadCount();
|
||||||
qDebug() << "Reserved threads " << reservedThreads;
|
qCDebug(interfaceapp) << "Reserved threads " << reservedThreads;
|
||||||
qDebug() << "Setting thread pool size to " << threadPoolSize;
|
qCDebug(interfaceapp) << "Setting thread pool size to " << threadPoolSize;
|
||||||
QThreadPool::globalInstance()->setMaxThreadCount(threadPoolSize);
|
QThreadPool::globalInstance()->setMaxThreadCount(threadPoolSize);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,3 +13,4 @@
|
||||||
|
|
||||||
Q_LOGGING_CATEGORY(interfaceapp, "hifi.interface")
|
Q_LOGGING_CATEGORY(interfaceapp, "hifi.interface")
|
||||||
Q_LOGGING_CATEGORY(interfaceapp_timing, "hifi.interface.timing")
|
Q_LOGGING_CATEGORY(interfaceapp_timing, "hifi.interface.timing")
|
||||||
|
Q_LOGGING_CATEGORY(interfaceapp_deadlock, "hifi.interface.deadlock")
|
||||||
|
|
|
@ -16,5 +16,6 @@
|
||||||
|
|
||||||
Q_DECLARE_LOGGING_CATEGORY(interfaceapp)
|
Q_DECLARE_LOGGING_CATEGORY(interfaceapp)
|
||||||
Q_DECLARE_LOGGING_CATEGORY(interfaceapp_timing)
|
Q_DECLARE_LOGGING_CATEGORY(interfaceapp_timing)
|
||||||
|
Q_DECLARE_LOGGING_CATEGORY(interfaceapp_deadlock)
|
||||||
|
|
||||||
#endif // hifi_InterfaceLogging_h
|
#endif // hifi_InterfaceLogging_h
|
||||||
|
|
|
@ -182,7 +182,7 @@ AudioClient::~AudioClient() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioClient::handleMismatchAudioFormat(SharedNodePointer node, const QString& currentCodec, const QString& recievedCodec) {
|
void AudioClient::handleMismatchAudioFormat(SharedNodePointer node, const QString& currentCodec, const QString& recievedCodec) {
|
||||||
qDebug() << __FUNCTION__ << "sendingNode:" << *node << "currentCodec:" << currentCodec << "recievedCodec:" << recievedCodec;
|
qCDebug(audioclient) << __FUNCTION__ << "sendingNode:" << *node << "currentCodec:" << currentCodec << "recievedCodec:" << recievedCodec;
|
||||||
selectAudioFormat(recievedCodec);
|
selectAudioFormat(recievedCodec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -632,7 +632,7 @@ void AudioClient::selectAudioFormat(const QString& selectedCodecName) {
|
||||||
|
|
||||||
_selectedCodecName = selectedCodecName;
|
_selectedCodecName = selectedCodecName;
|
||||||
|
|
||||||
qDebug() << "Selected Codec:" << _selectedCodecName;
|
qCDebug(audioclient) << "Selected Codec:" << _selectedCodecName;
|
||||||
|
|
||||||
// release any old codec encoder/decoder first...
|
// release any old codec encoder/decoder first...
|
||||||
if (_codec && _encoder) {
|
if (_codec && _encoder) {
|
||||||
|
@ -648,7 +648,7 @@ void AudioClient::selectAudioFormat(const QString& selectedCodecName) {
|
||||||
_codec = plugin;
|
_codec = plugin;
|
||||||
_receivedAudioStream.setupCodec(plugin, _selectedCodecName, AudioConstants::STEREO);
|
_receivedAudioStream.setupCodec(plugin, _selectedCodecName, AudioConstants::STEREO);
|
||||||
_encoder = plugin->createEncoder(AudioConstants::SAMPLE_RATE, AudioConstants::MONO);
|
_encoder = plugin->createEncoder(AudioConstants::SAMPLE_RATE, AudioConstants::MONO);
|
||||||
qDebug() << "Selected Codec Plugin:" << _codec.get();
|
qCDebug(audioclient) << "Selected Codec Plugin:" << _codec.get();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -997,21 +997,21 @@ void AudioClient::mixLocalAudioInjectors(float* mixBuffer) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
qDebug() << "injector has no more data, marking finished for removal";
|
qCDebug(audioclient) << "injector has no more data, marking finished for removal";
|
||||||
injector->finishLocalInjection();
|
injector->finishLocalInjection();
|
||||||
injectorsToRemove.append(injector);
|
injectorsToRemove.append(injector);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
qDebug() << "injector has no local buffer, marking as finished for removal";
|
qCDebug(audioclient) << "injector has no local buffer, marking as finished for removal";
|
||||||
injector->finishLocalInjection();
|
injector->finishLocalInjection();
|
||||||
injectorsToRemove.append(injector);
|
injectorsToRemove.append(injector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (AudioInjector* injector : injectorsToRemove) {
|
for (AudioInjector* injector : injectorsToRemove) {
|
||||||
qDebug() << "removing injector";
|
qCDebug(audioclient) << "removing injector";
|
||||||
getActiveLocalAudioInjectors().removeOne(injector);
|
getActiveLocalAudioInjectors().removeOne(injector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1106,10 +1106,10 @@ bool AudioClient::outputLocalInjector(bool isStereo, AudioInjector* injector) {
|
||||||
// Since this is invoked with invokeMethod, there _should_ be
|
// Since this is invoked with invokeMethod, there _should_ be
|
||||||
// no reason to lock access to the vector of injectors.
|
// no reason to lock access to the vector of injectors.
|
||||||
if (!_activeLocalAudioInjectors.contains(injector)) {
|
if (!_activeLocalAudioInjectors.contains(injector)) {
|
||||||
qDebug() << "adding new injector";
|
qCDebug(audioclient) << "adding new injector";
|
||||||
_activeLocalAudioInjectors.append(injector);
|
_activeLocalAudioInjectors.append(injector);
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "injector exists in active list already";
|
qCDebug(audioclient) << "injector exists in active list already";
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1204,7 +1204,7 @@ bool AudioClient::switchInputToAudioDevice(const QAudioDeviceInfo& inputDeviceIn
|
||||||
void AudioClient::outputNotify() {
|
void AudioClient::outputNotify() {
|
||||||
int recentUnfulfilled = _audioOutputIODevice.getRecentUnfulfilledReads();
|
int recentUnfulfilled = _audioOutputIODevice.getRecentUnfulfilledReads();
|
||||||
if (recentUnfulfilled > 0) {
|
if (recentUnfulfilled > 0) {
|
||||||
qCInfo(audioclient, "Starve detected, %d new unfulfilled reads", recentUnfulfilled);
|
qCDebug(audioclient, "Starve detected, %d new unfulfilled reads", recentUnfulfilled);
|
||||||
|
|
||||||
if (_outputStarveDetectionEnabled.get()) {
|
if (_outputStarveDetectionEnabled.get()) {
|
||||||
quint64 now = usecTimestampNow() / 1000;
|
quint64 now = usecTimestampNow() / 1000;
|
||||||
|
@ -1219,7 +1219,8 @@ void AudioClient::outputNotify() {
|
||||||
int newOutputBufferSizeFrames = setOutputBufferSize(oldOutputBufferSizeFrames + 1, false);
|
int newOutputBufferSizeFrames = setOutputBufferSize(oldOutputBufferSizeFrames + 1, false);
|
||||||
|
|
||||||
if (newOutputBufferSizeFrames > oldOutputBufferSizeFrames) {
|
if (newOutputBufferSizeFrames > oldOutputBufferSizeFrames) {
|
||||||
qCInfo(audioclient, "Starve threshold surpassed (%d starves in %d ms)", _outputStarveDetectionCount, dt);
|
qCDebug(audioclient,
|
||||||
|
"Starve threshold surpassed (%d starves in %d ms)", _outputStarveDetectionCount, dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
_outputStarveDetectionStartTimeMsec = now;
|
_outputStarveDetectionStartTimeMsec = now;
|
||||||
|
@ -1460,10 +1461,10 @@ void AudioClient::loadSettings() {
|
||||||
_receivedAudioStream.setWindowSecondsForDesiredReduction(windowSecondsForDesiredReduction.get());
|
_receivedAudioStream.setWindowSecondsForDesiredReduction(windowSecondsForDesiredReduction.get());
|
||||||
_receivedAudioStream.setRepetitionWithFade(repetitionWithFade.get());
|
_receivedAudioStream.setRepetitionWithFade(repetitionWithFade.get());
|
||||||
|
|
||||||
qDebug() << "---- Initializing Audio Client ----";
|
qCDebug(audioclient) << "---- Initializing Audio Client ----";
|
||||||
auto codecPlugins = PluginManager::getInstance()->getCodecPlugins();
|
auto codecPlugins = PluginManager::getInstance()->getCodecPlugins();
|
||||||
for (auto& plugin : codecPlugins) {
|
for (auto& plugin : codecPlugins) {
|
||||||
qDebug() << "Codec available:" << plugin->getName();
|
qCDebug(audioclient) << "Codec available:" << plugin->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -665,7 +665,7 @@ Mapping::Pointer UserInputMapper::newMapping(const QString& mappingName) {
|
||||||
if (_mappingsByName.count(mappingName)) {
|
if (_mappingsByName.count(mappingName)) {
|
||||||
qCWarning(controllers) << "Refusing to recreate mapping named " << mappingName;
|
qCWarning(controllers) << "Refusing to recreate mapping named " << mappingName;
|
||||||
}
|
}
|
||||||
qDebug() << "Creating new Mapping " << mappingName;
|
qCDebug(controllers) << "Creating new Mapping " << mappingName;
|
||||||
auto mapping = std::make_shared<Mapping>(mappingName);
|
auto mapping = std::make_shared<Mapping>(mappingName);
|
||||||
_mappingsByName[mappingName] = mapping;
|
_mappingsByName[mappingName] = mapping;
|
||||||
return mapping;
|
return mapping;
|
||||||
|
@ -1121,15 +1121,15 @@ Mapping::Pointer UserInputMapper::parseMapping(const QString& json) {
|
||||||
QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8(), &error);
|
QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8(), &error);
|
||||||
// check validity of the document
|
// check validity of the document
|
||||||
if (doc.isNull()) {
|
if (doc.isNull()) {
|
||||||
qDebug() << "Invalid JSON...\n";
|
qCDebug(controllers) << "Invalid JSON...\n";
|
||||||
qDebug() << error.errorString();
|
qCDebug(controllers) << error.errorString();
|
||||||
qDebug() << "JSON was:\n" << json << endl;
|
qCDebug(controllers) << "JSON was:\n" << json << endl;
|
||||||
return Mapping::Pointer();
|
return Mapping::Pointer();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!doc.isObject()) {
|
if (!doc.isObject()) {
|
||||||
qWarning() << "Mapping json Document is not an object" << endl;
|
qWarning() << "Mapping json Document is not an object" << endl;
|
||||||
qDebug() << "JSON was:\n" << json << endl;
|
qCDebug(controllers) << "JSON was:\n" << json << endl;
|
||||||
return Mapping::Pointer();
|
return Mapping::Pointer();
|
||||||
}
|
}
|
||||||
return parseMapping(doc.object());
|
return parseMapping(doc.object());
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include <QtCore/QFileInfo>
|
#include <QtCore/QFileInfo>
|
||||||
|
|
||||||
#include <shared/NsightHelpers.h>
|
#include <shared/NsightHelpers.h>
|
||||||
|
#include "ModelFormatLogging.h"
|
||||||
|
|
||||||
template<class T> int streamSize() {
|
template<class T> int streamSize() {
|
||||||
return sizeof(T);
|
return sizeof(T);
|
||||||
|
@ -356,7 +357,7 @@ FBXNode FBXReader::parseFBX(QIODevice* device) {
|
||||||
quint32 fileVersion;
|
quint32 fileVersion;
|
||||||
in >> fileVersion;
|
in >> fileVersion;
|
||||||
position += sizeof(fileVersion);
|
position += sizeof(fileVersion);
|
||||||
qDebug() << "fileVersion:" << fileVersion;
|
qCDebug(modelformat) << "fileVersion:" << fileVersion;
|
||||||
bool has64BitPositions = (fileVersion >= VERSION_FBX2016);
|
bool has64BitPositions = (fileVersion >= VERSION_FBX2016);
|
||||||
|
|
||||||
// parse the top-level node
|
// parse the top-level node
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
|
|
||||||
#include <GLMHelpers.h>
|
#include <GLMHelpers.h>
|
||||||
|
#include "GLLogging.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
|
||||||
|
@ -111,7 +113,7 @@ void GLAPIENTRY debugMessageCallback(GLenum source, GLenum type, GLuint id, GLen
|
||||||
if (GL_DEBUG_SEVERITY_NOTIFICATION == severity) {
|
if (GL_DEBUG_SEVERITY_NOTIFICATION == severity) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
qDebug() << "QQQ " << message;
|
qCDebug(glLogging) << "QQQ " << message;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME build the PFD based on the
|
// FIXME build the PFD based on the
|
||||||
|
|
|
@ -65,7 +65,7 @@ class Context {
|
||||||
QWindow* _window { nullptr };
|
QWindow* _window { nullptr };
|
||||||
public:
|
public:
|
||||||
virtual ~OffscreenContext();
|
virtual ~OffscreenContext();
|
||||||
virtual void create();
|
void create() override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
14
libraries/gl/src/gl/GLLogging.cpp
Normal file
14
libraries/gl/src/gl/GLLogging.cpp
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
//
|
||||||
|
// GLLogging.cpp
|
||||||
|
// libraries/gl/src/gl/
|
||||||
|
//
|
||||||
|
// Created by Seth Alves on 2016-9-14.
|
||||||
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distribucted under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "GLLogging.h"
|
||||||
|
|
||||||
|
Q_LOGGING_CATEGORY(glLogging, "hifi.glLogging")
|
19
libraries/gl/src/gl/GLLogging.h
Normal file
19
libraries/gl/src/gl/GLLogging.h
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
//
|
||||||
|
// GLLogging.h
|
||||||
|
// libraries/gl/src/gl/
|
||||||
|
//
|
||||||
|
// Created by Seth Alves on 2016-9-14.
|
||||||
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef hifi_GLLogging_h
|
||||||
|
#define hifi_GLLogging_h
|
||||||
|
|
||||||
|
#include <QLoggingCategory>
|
||||||
|
|
||||||
|
Q_DECLARE_LOGGING_CATEGORY(glLogging)
|
||||||
|
|
||||||
|
#endif // hifi_GLLogging_h
|
|
@ -12,6 +12,7 @@
|
||||||
#include <QtGui/QOpenGLContext>
|
#include <QtGui/QOpenGLContext>
|
||||||
|
|
||||||
#include "GLHelpers.h"
|
#include "GLHelpers.h"
|
||||||
|
#include "GLLogging.h"
|
||||||
|
|
||||||
void GLWindow::createContext(QOpenGLContext* shareContext) {
|
void GLWindow::createContext(QOpenGLContext* shareContext) {
|
||||||
createContext(getDefaultOpenGLSurfaceFormat(), shareContext);
|
createContext(getDefaultOpenGLSurfaceFormat(), shareContext);
|
||||||
|
@ -41,10 +42,10 @@ bool GLWindow::makeCurrent() {
|
||||||
Q_ASSERT(makeCurrentResult);
|
Q_ASSERT(makeCurrentResult);
|
||||||
|
|
||||||
std::call_once(_reportOnce, []{
|
std::call_once(_reportOnce, []{
|
||||||
qDebug() << "GL Version: " << QString((const char*) glGetString(GL_VERSION));
|
qCDebug(glLogging) << "GL Version: " << QString((const char*) glGetString(GL_VERSION));
|
||||||
qDebug() << "GL Shader Language Version: " << QString((const char*) glGetString(GL_SHADING_LANGUAGE_VERSION));
|
qCDebug(glLogging) << "GL Shader Language Version: " << QString((const char*) glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||||
qDebug() << "GL Vendor: " << QString((const char*) glGetString(GL_VENDOR));
|
qCDebug(glLogging) << "GL Vendor: " << QString((const char*) glGetString(GL_VENDOR));
|
||||||
qDebug() << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER));
|
qCDebug(glLogging) << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER));
|
||||||
});
|
});
|
||||||
|
|
||||||
Q_ASSERT(_context == QOpenGLContext::currentContext());
|
Q_ASSERT(_context == QOpenGLContext::currentContext());
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#include <QtGui/QOpenGLContext>
|
#include <QtGui/QOpenGLContext>
|
||||||
|
|
||||||
#include "GLHelpers.h"
|
#include "GLHelpers.h"
|
||||||
|
#include "GLLogging.h"
|
||||||
|
|
||||||
|
|
||||||
OffscreenGLCanvas::OffscreenGLCanvas() : _context(new QOpenGLContext), _offscreenSurface(new QOffscreenSurface){
|
OffscreenGLCanvas::OffscreenGLCanvas() : _context(new QOpenGLContext), _offscreenSurface(new QOffscreenSurface){
|
||||||
}
|
}
|
||||||
|
@ -56,10 +58,10 @@ bool OffscreenGLCanvas::makeCurrent() {
|
||||||
Q_ASSERT(result);
|
Q_ASSERT(result);
|
||||||
|
|
||||||
std::call_once(_reportOnce, [this]{
|
std::call_once(_reportOnce, [this]{
|
||||||
qDebug() << "GL Version: " << QString((const char*) glGetString(GL_VERSION));
|
qCDebug(glLogging) << "GL Version: " << QString((const char*) glGetString(GL_VERSION));
|
||||||
qDebug() << "GL Shader Language Version: " << QString((const char*) glGetString(GL_SHADING_LANGUAGE_VERSION));
|
qCDebug(glLogging) << "GL Shader Language Version: " << QString((const char*) glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||||
qDebug() << "GL Vendor: " << QString((const char*) glGetString(GL_VENDOR));
|
qCDebug(glLogging) << "GL Vendor: " << QString((const char*) glGetString(GL_VENDOR));
|
||||||
qDebug() << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER));
|
qCDebug(glLogging) << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER));
|
||||||
});
|
});
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "OffscreenGLCanvas.h"
|
#include "OffscreenGLCanvas.h"
|
||||||
#include "GLEscrow.h"
|
#include "GLEscrow.h"
|
||||||
#include "GLHelpers.h"
|
#include "GLHelpers.h"
|
||||||
|
#include "GLLogging.h"
|
||||||
|
|
||||||
|
|
||||||
QString fixupHifiUrl(const QString& urlString) {
|
QString fixupHifiUrl(const QString& urlString) {
|
||||||
|
@ -196,7 +197,7 @@ QEvent* OffscreenQmlRenderThread::Queue::take() {
|
||||||
|
|
||||||
OffscreenQmlRenderThread::OffscreenQmlRenderThread(OffscreenQmlSurface* surface, QOpenGLContext* shareContext) : _surface(surface) {
|
OffscreenQmlRenderThread::OffscreenQmlRenderThread(OffscreenQmlSurface* surface, QOpenGLContext* shareContext) : _surface(surface) {
|
||||||
_canvas.setObjectName("OffscreenQmlRenderCanvas");
|
_canvas.setObjectName("OffscreenQmlRenderCanvas");
|
||||||
qDebug() << "Building QML Renderer";
|
qCDebug(glLogging) << "Building QML Renderer";
|
||||||
if (!_canvas.create(shareContext)) {
|
if (!_canvas.create(shareContext)) {
|
||||||
qWarning("Failed to create OffscreenGLCanvas");
|
qWarning("Failed to create OffscreenGLCanvas");
|
||||||
_quit = true;
|
_quit = true;
|
||||||
|
@ -223,7 +224,7 @@ OffscreenQmlRenderThread::OffscreenQmlRenderThread(OffscreenQmlSurface* surface,
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffscreenQmlRenderThread::run() {
|
void OffscreenQmlRenderThread::run() {
|
||||||
qDebug() << "Starting QML Renderer thread";
|
qCDebug(glLogging) << "Starting QML Renderer thread";
|
||||||
|
|
||||||
while (!_quit) {
|
while (!_quit) {
|
||||||
QEvent* e = _queue.take();
|
QEvent* e = _queue.take();
|
||||||
|
@ -282,7 +283,7 @@ QJsonObject OffscreenQmlRenderThread::getGLContextData() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffscreenQmlRenderThread::init() {
|
void OffscreenQmlRenderThread::init() {
|
||||||
qDebug() << "Initializing QML Renderer";
|
qCDebug(glLogging) << "Initializing QML Renderer";
|
||||||
|
|
||||||
if (!_canvas.makeCurrent()) {
|
if (!_canvas.makeCurrent()) {
|
||||||
qWarning("Failed to make context current on QML Renderer Thread");
|
qWarning("Failed to make context current on QML Renderer Thread");
|
||||||
|
@ -341,7 +342,7 @@ void OffscreenQmlRenderThread::resize() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "Offscreen UI resizing to " << _newSize.width() << "x" << _newSize.height() << " with pixel ratio " << pixelRatio;
|
qCDebug(glLogging) << "Offscreen UI resizing to " << _newSize.width() << "x" << _newSize.height() << " with pixel ratio " << pixelRatio;
|
||||||
_size = newOffscreenSize;
|
_size = newOffscreenSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,7 +427,7 @@ OffscreenQmlSurface::~OffscreenQmlSurface() {
|
||||||
QObject::disconnect(&_updateTimer);
|
QObject::disconnect(&_updateTimer);
|
||||||
QObject::disconnect(qApp);
|
QObject::disconnect(qApp);
|
||||||
|
|
||||||
qDebug() << "Stopping QML Renderer Thread " << _renderer->currentThreadId();
|
qCDebug(glLogging) << "Stopping QML Renderer Thread " << _renderer->currentThreadId();
|
||||||
_renderer->_queue.add(STOP);
|
_renderer->_queue.add(STOP);
|
||||||
if (!_renderer->wait(MAX_SHUTDOWN_WAIT_SECS * USECS_PER_SECOND)) {
|
if (!_renderer->wait(MAX_SHUTDOWN_WAIT_SECS * USECS_PER_SECOND)) {
|
||||||
qWarning() << "Failed to shut down the QML Renderer Thread";
|
qWarning() << "Failed to shut down the QML Renderer Thread";
|
||||||
|
@ -443,7 +444,7 @@ void OffscreenQmlSurface::onAboutToQuit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffscreenQmlSurface::create(QOpenGLContext* shareContext) {
|
void OffscreenQmlSurface::create(QOpenGLContext* shareContext) {
|
||||||
qDebug() << "Building QML surface";
|
qCDebug(glLogging) << "Building QML surface";
|
||||||
|
|
||||||
_renderer = new OffscreenQmlRenderThread(this, shareContext);
|
_renderer = new OffscreenQmlRenderThread(this, shareContext);
|
||||||
_renderer->moveToThread(_renderer);
|
_renderer->moveToThread(_renderer);
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <oglplus/shapes/plane.hpp>
|
#include <oglplus/shapes/plane.hpp>
|
||||||
#include <oglplus/shapes/sky_box.hpp>
|
#include <oglplus/shapes/sky_box.hpp>
|
||||||
|
#include "GLLogging.h"
|
||||||
|
|
||||||
using namespace oglplus;
|
using namespace oglplus;
|
||||||
using namespace oglplus::shapes;
|
using namespace oglplus::shapes;
|
||||||
|
@ -190,7 +191,7 @@ public:
|
||||||
const int stacks_) {
|
const int stacks_) {
|
||||||
//UV mapping source: http://www.mvps.org/directx/articles/spheremap.htm
|
//UV mapping source: http://www.mvps.org/directx/articles/spheremap.htm
|
||||||
if (fov >= PI) {
|
if (fov >= PI) {
|
||||||
qDebug() << "TexturedHemisphere::buildVBO(): FOV greater or equal than Pi will create issues";
|
qCDebug(glLogging) << "TexturedHemisphere::buildVBO(): FOV greater or equal than Pi will create issues";
|
||||||
}
|
}
|
||||||
|
|
||||||
int gridSize = std::max(slices_, stacks_);
|
int gridSize = std::max(slices_, stacks_);
|
||||||
|
|
|
@ -44,10 +44,10 @@ BackendPointer GLBackend::createBackend() {
|
||||||
auto version = QOpenGLContextWrapper::currentContextVersion();
|
auto version = QOpenGLContextWrapper::currentContextVersion();
|
||||||
std::shared_ptr<GLBackend> result;
|
std::shared_ptr<GLBackend> result;
|
||||||
if (!disableOpenGL45 && version >= 0x0405) {
|
if (!disableOpenGL45 && version >= 0x0405) {
|
||||||
qDebug() << "Using OpenGL 4.5 backend";
|
qCDebug(gpugllogging) << "Using OpenGL 4.5 backend";
|
||||||
result = std::make_shared<gpu::gl45::GL45Backend>();
|
result = std::make_shared<gpu::gl45::GL45Backend>();
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Using OpenGL 4.1 backend";
|
qCDebug(gpugllogging) << "Using OpenGL 4.1 backend";
|
||||||
result = std::make_shared<gpu::gl41::GL41Backend>();
|
result = std::make_shared<gpu::gl41::GL41Backend>();
|
||||||
}
|
}
|
||||||
result->initInput();
|
result->initInput();
|
||||||
|
|
|
@ -765,7 +765,7 @@ void AddressManager::handleShareableNameAPIResponse(QNetworkReply& requestReply)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shareableNameChanged) {
|
if (shareableNameChanged) {
|
||||||
qDebug() << "AddressManager shareable name changed to" << _shareablePlaceName;
|
qCDebug(networking) << "AddressManager shareable name changed to" << _shareablePlaceName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ void AssetClient::init() {
|
||||||
cache->setMaximumCacheSize(MAXIMUM_CACHE_SIZE);
|
cache->setMaximumCacheSize(MAXIMUM_CACHE_SIZE);
|
||||||
cache->setCacheDirectory(cachePath);
|
cache->setCacheDirectory(cachePath);
|
||||||
networkAccessManager.setCache(cache);
|
networkAccessManager.setCache(cache);
|
||||||
qDebug() << "ResourceManager disk cache setup at" << cachePath
|
qInfo() << "ResourceManager disk cache setup at" << cachePath
|
||||||
<< "(size:" << MAXIMUM_CACHE_SIZE / BYTES_PER_GIGABYTES << "GB)";
|
<< "(size:" << MAXIMUM_CACHE_SIZE / BYTES_PER_GIGABYTES << "GB)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ void AssetClient::clearCache() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (auto cache = NetworkAccessManager::getInstance().cache()) {
|
if (auto cache = NetworkAccessManager::getInstance().cache()) {
|
||||||
qDebug() << "AssetClient::clearCache(): Clearing disk cache.";
|
qInfo() << "AssetClient::clearCache(): Clearing disk cache.";
|
||||||
cache->clear();
|
cache->clear();
|
||||||
} else {
|
} else {
|
||||||
qCWarning(asset_client) << "No disk cache to clear.";
|
qCWarning(asset_client) << "No disk cache to clear.";
|
||||||
|
|
|
@ -351,7 +351,7 @@ qint64 LimitedNodeList::sendPacket(std::unique_ptr<NLPacket> packet, const Node&
|
||||||
|
|
||||||
return sendPacket(std::move(packet), *activeSocket, destinationNode.getConnectionSecret());
|
return sendPacket(std::move(packet), *activeSocket, destinationNode.getConnectionSecret());
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "LimitedNodeList::sendPacket called without active socket for node" << destinationNode << "- not sending";
|
qCDebug(networking) << "LimitedNodeList::sendPacket called without active socket for node" << destinationNode << "- not sending";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -389,7 +389,7 @@ qint64 LimitedNodeList::sendPacketList(NLPacketList& packetList, const Node& des
|
||||||
emit dataSent(destinationNode.getType(), bytesSent);
|
emit dataSent(destinationNode.getType(), bytesSent);
|
||||||
return bytesSent;
|
return bytesSent;
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "LimitedNodeList::sendPacketList called without active socket for node" << destinationNode
|
qCDebug(networking) << "LimitedNodeList::sendPacketList called without active socket for node" << destinationNode
|
||||||
<< " - not sending.";
|
<< " - not sending.";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -322,7 +322,8 @@ void PhysicalEntitySimulation::addAction(EntityActionPointer action) {
|
||||||
QMutexLocker lock(&_mutex);
|
QMutexLocker lock(&_mutex);
|
||||||
const QUuid& actionID = action->getID();
|
const QUuid& actionID = action->getID();
|
||||||
if (_physicsEngine->getActionByID(actionID)) {
|
if (_physicsEngine->getActionByID(actionID)) {
|
||||||
qDebug() << "warning -- PhysicalEntitySimulation::addAction -- adding an action that was already in _physicsEngine";
|
qCDebug(physics) << "warning -- PhysicalEntitySimulation::addAction -- adding an "
|
||||||
|
"action that was already in _physicsEngine";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EntitySimulation::addAction(action);
|
EntitySimulation::addAction(action);
|
||||||
|
|
14
libraries/plugins/src/plugins/PluginLogging.cpp
Normal file
14
libraries/plugins/src/plugins/PluginLogging.cpp
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
//
|
||||||
|
// PluginLogging.cpp
|
||||||
|
// libraries/gl/src/gl/
|
||||||
|
//
|
||||||
|
// Created by Seth Alves on 2016-9-14.
|
||||||
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distribucted under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "PluginLogging.h"
|
||||||
|
|
||||||
|
Q_LOGGING_CATEGORY(plugins, "hifi.plugins")
|
19
libraries/plugins/src/plugins/PluginLogging.h
Normal file
19
libraries/plugins/src/plugins/PluginLogging.h
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
//
|
||||||
|
// PluginLogging.h
|
||||||
|
// libraries/gl/src/gl/
|
||||||
|
//
|
||||||
|
// Created by Seth Alves on 2016-9-14.
|
||||||
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef hifi_PluginLogging_h
|
||||||
|
#define hifi_PluginLogging_h
|
||||||
|
|
||||||
|
#include <QLoggingCategory>
|
||||||
|
|
||||||
|
Q_DECLARE_LOGGING_CATEGORY(plugins)
|
||||||
|
|
||||||
|
#endif // hifi_PluginLogging_h
|
|
@ -21,6 +21,7 @@
|
||||||
#include "CodecPlugin.h"
|
#include "CodecPlugin.h"
|
||||||
#include "DisplayPlugin.h"
|
#include "DisplayPlugin.h"
|
||||||
#include "InputPlugin.h"
|
#include "InputPlugin.h"
|
||||||
|
#include "PluginLogging.h"
|
||||||
|
|
||||||
|
|
||||||
PluginManager* PluginManager::getInstance() {
|
PluginManager* PluginManager::getInstance() {
|
||||||
|
@ -87,10 +88,10 @@ const LoaderList& getLoadedPlugins() {
|
||||||
QDir pluginDir(pluginPath);
|
QDir pluginDir(pluginPath);
|
||||||
pluginDir.setFilter(QDir::Files);
|
pluginDir.setFilter(QDir::Files);
|
||||||
if (pluginDir.exists()) {
|
if (pluginDir.exists()) {
|
||||||
qDebug() << "Loading runtime plugins from " << pluginPath;
|
qInfo() << "Loading runtime plugins from " << pluginPath;
|
||||||
auto candidates = pluginDir.entryList();
|
auto candidates = pluginDir.entryList();
|
||||||
for (auto plugin : candidates) {
|
for (auto plugin : candidates) {
|
||||||
qDebug() << "Attempting plugin" << qPrintable(plugin);
|
qCDebug(plugins) << "Attempting plugin" << qPrintable(plugin);
|
||||||
QSharedPointer<QPluginLoader> loader(new QPluginLoader(pluginPath + plugin));
|
QSharedPointer<QPluginLoader> loader(new QPluginLoader(pluginPath + plugin));
|
||||||
|
|
||||||
if (isDisabled(loader->metaData())) {
|
if (isDisabled(loader->metaData())) {
|
||||||
|
@ -100,11 +101,11 @@ const LoaderList& getLoadedPlugins() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loader->load()) {
|
if (loader->load()) {
|
||||||
qDebug() << "Plugin" << qPrintable(plugin) << "loaded successfully";
|
qCDebug(plugins) << "Plugin" << qPrintable(plugin) << "loaded successfully";
|
||||||
loadedPlugins.push_back(loader);
|
loadedPlugins.push_back(loader);
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Plugin" << qPrintable(plugin) << "failed to load:";
|
qCDebug(plugins) << "Plugin" << qPrintable(plugin) << "failed to load:";
|
||||||
qDebug() << " " << qPrintable(loader->errorString());
|
qCDebug(plugins) << " " << qPrintable(loader->errorString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,7 +140,7 @@ const CodecPluginList& PluginManager::getCodecPlugins() {
|
||||||
plugin->setContainer(_container);
|
plugin->setContainer(_container);
|
||||||
plugin->init();
|
plugin->init();
|
||||||
|
|
||||||
qDebug() << "init codec:" << plugin->getName();
|
qCDebug(plugins) << "init codec:" << plugin->getName();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return codecPlugins;
|
return codecPlugins;
|
||||||
|
@ -157,11 +158,11 @@ static DisplayPluginList displayPlugins;
|
||||||
const DisplayPluginList& PluginManager::getDisplayPlugins() {
|
const DisplayPluginList& PluginManager::getDisplayPlugins() {
|
||||||
static std::once_flag once;
|
static std::once_flag once;
|
||||||
static auto deviceAddedCallback = [](QString deviceName) {
|
static auto deviceAddedCallback = [](QString deviceName) {
|
||||||
qDebug() << "Added device: " << deviceName;
|
qCDebug(plugins) << "Added device: " << deviceName;
|
||||||
UserActivityLogger::getInstance().connectedDevice("display", deviceName);
|
UserActivityLogger::getInstance().connectedDevice("display", deviceName);
|
||||||
};
|
};
|
||||||
static auto subdeviceAddedCallback = [](QString pluginName, QString deviceName) {
|
static auto subdeviceAddedCallback = [](QString pluginName, QString deviceName) {
|
||||||
qDebug() << "Added subdevice: " << deviceName;
|
qCDebug(plugins) << "Added subdevice: " << deviceName;
|
||||||
UserActivityLogger::getInstance().connectedDevice("display", pluginName + " | " + deviceName);
|
UserActivityLogger::getInstance().connectedDevice("display", pluginName + " | " + deviceName);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -204,11 +205,11 @@ const InputPluginList& PluginManager::getInputPlugins() {
|
||||||
static InputPluginList inputPlugins;
|
static InputPluginList inputPlugins;
|
||||||
static std::once_flag once;
|
static std::once_flag once;
|
||||||
static auto deviceAddedCallback = [](QString deviceName) {
|
static auto deviceAddedCallback = [](QString deviceName) {
|
||||||
qDebug() << "Added device: " << deviceName;
|
qCDebug(plugins) << "Added device: " << deviceName;
|
||||||
UserActivityLogger::getInstance().connectedDevice("input", deviceName);
|
UserActivityLogger::getInstance().connectedDevice("input", deviceName);
|
||||||
};
|
};
|
||||||
static auto subdeviceAddedCallback = [](QString pluginName, QString deviceName) {
|
static auto subdeviceAddedCallback = [](QString pluginName, QString deviceName) {
|
||||||
qDebug() << "Added subdevice: " << deviceName;
|
qCDebug(plugins) << "Added subdevice: " << deviceName;
|
||||||
UserActivityLogger::getInstance().connectedDevice("input", pluginName + " | " + deviceName);
|
UserActivityLogger::getInstance().connectedDevice("input", pluginName + " | " + deviceName);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,9 @@ bool Procedural::parseShader(const QUrl& shaderPath) {
|
||||||
|
|
||||||
if (_shaderUrl.isLocalFile()) {
|
if (_shaderUrl.isLocalFile()) {
|
||||||
_shaderPath = _shaderUrl.toLocalFile();
|
_shaderPath = _shaderUrl.toLocalFile();
|
||||||
|
#if WANT_DEBUG
|
||||||
qDebug() << "Shader path: " << _shaderPath;
|
qDebug() << "Shader path: " << _shaderPath;
|
||||||
|
#endif
|
||||||
if (!QFile(_shaderPath).exists()) {
|
if (!QFile(_shaderPath).exists()) {
|
||||||
_networkShader.reset();
|
_networkShader.reset();
|
||||||
return false;;
|
return false;;
|
||||||
|
|
|
@ -767,72 +767,79 @@ void disableQtBearerPoll() {
|
||||||
|
|
||||||
void printSystemInformation() {
|
void printSystemInformation() {
|
||||||
// Write system information to log
|
// Write system information to log
|
||||||
qDebug() << "Build Information";
|
qCDebug(shared) << "Build Information";
|
||||||
qDebug().noquote() << "\tBuild ABI: " << QSysInfo::buildAbi();
|
qCDebug(shared).noquote() << "\tBuild ABI: " << QSysInfo::buildAbi();
|
||||||
qDebug().noquote() << "\tBuild CPU Architecture: " << QSysInfo::buildCpuArchitecture();
|
qCDebug(shared).noquote() << "\tBuild CPU Architecture: " << QSysInfo::buildCpuArchitecture();
|
||||||
|
|
||||||
qDebug().noquote() << "System Information";
|
qCDebug(shared).noquote() << "System Information";
|
||||||
qDebug().noquote() << "\tProduct Name: " << QSysInfo::prettyProductName();
|
qCDebug(shared).noquote() << "\tProduct Name: " << QSysInfo::prettyProductName();
|
||||||
qDebug().noquote() << "\tCPU Architecture: " << QSysInfo::currentCpuArchitecture();
|
qCDebug(shared).noquote() << "\tCPU Architecture: " << QSysInfo::currentCpuArchitecture();
|
||||||
qDebug().noquote() << "\tKernel Type: " << QSysInfo::kernelType();
|
qCDebug(shared).noquote() << "\tKernel Type: " << QSysInfo::kernelType();
|
||||||
qDebug().noquote() << "\tKernel Version: " << QSysInfo::kernelVersion();
|
qCDebug(shared).noquote() << "\tKernel Version: " << QSysInfo::kernelVersion();
|
||||||
|
|
||||||
auto macVersion = QSysInfo::macVersion();
|
auto macVersion = QSysInfo::macVersion();
|
||||||
if (macVersion != QSysInfo::MV_None) {
|
if (macVersion != QSysInfo::MV_None) {
|
||||||
qDebug() << "\tMac Version: " << macVersion;
|
qCDebug(shared) << "\tMac Version: " << macVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto windowsVersion = QSysInfo::windowsVersion();
|
auto windowsVersion = QSysInfo::windowsVersion();
|
||||||
if (windowsVersion != QSysInfo::WV_None) {
|
if (windowsVersion != QSysInfo::WV_None) {
|
||||||
qDebug() << "\tWindows Version: " << windowsVersion;
|
qCDebug(shared) << "\tWindows Version: " << windowsVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
SYSTEM_INFO si;
|
SYSTEM_INFO si;
|
||||||
GetNativeSystemInfo(&si);
|
GetNativeSystemInfo(&si);
|
||||||
|
|
||||||
qDebug() << "SYSTEM_INFO";
|
qCDebug(shared) << "SYSTEM_INFO";
|
||||||
qDebug().noquote() << "\tOEM ID: " << si.dwOemId;
|
qCDebug(shared).noquote() << "\tOEM ID: " << si.dwOemId;
|
||||||
qDebug().noquote() << "\tProcessor Architecture: " << si.wProcessorArchitecture;
|
qCDebug(shared).noquote() << "\tProcessor Architecture: " << si.wProcessorArchitecture;
|
||||||
qDebug().noquote() << "\tProcessor Type: " << si.dwProcessorType;
|
qCDebug(shared).noquote() << "\tProcessor Type: " << si.dwProcessorType;
|
||||||
qDebug().noquote() << "\tProcessor Level: " << si.wProcessorLevel;
|
qCDebug(shared).noquote() << "\tProcessor Level: " << si.wProcessorLevel;
|
||||||
qDebug().noquote() << "\tProcessor Revision: "
|
qCDebug(shared).noquote() << "\tProcessor Revision: "
|
||||||
<< QString("0x%1").arg(si.wProcessorRevision, 4, 16, QChar('0'));
|
<< QString("0x%1").arg(si.wProcessorRevision, 4, 16, QChar('0'));
|
||||||
qDebug().noquote() << "\tNumber of Processors: " << si.dwNumberOfProcessors;
|
qCDebug(shared).noquote() << "\tNumber of Processors: " << si.dwNumberOfProcessors;
|
||||||
qDebug().noquote() << "\tPage size: " << si.dwPageSize << " Bytes";
|
qCDebug(shared).noquote() << "\tPage size: " << si.dwPageSize << " Bytes";
|
||||||
qDebug().noquote() << "\tMin Application Address: "
|
qCDebug(shared).noquote() << "\tMin Application Address: "
|
||||||
<< QString("0x%1").arg(qulonglong(si.lpMinimumApplicationAddress), 16, 16, QChar('0'));
|
<< QString("0x%1").arg(qulonglong(si.lpMinimumApplicationAddress), 16, 16, QChar('0'));
|
||||||
qDebug().noquote() << "\tMax Application Address: "
|
qCDebug(shared).noquote() << "\tMax Application Address: "
|
||||||
<< QString("0x%1").arg(qulonglong(si.lpMaximumApplicationAddress), 16, 16, QChar('0'));
|
<< QString("0x%1").arg(qulonglong(si.lpMaximumApplicationAddress), 16, 16, QChar('0'));
|
||||||
|
|
||||||
const double BYTES_TO_MEGABYTE = 1.0 / (1024 * 1024);
|
const double BYTES_TO_MEGABYTE = 1.0 / (1024 * 1024);
|
||||||
|
|
||||||
qDebug() << "MEMORYSTATUSEX";
|
qCDebug(shared) << "MEMORYSTATUSEX";
|
||||||
MEMORYSTATUSEX ms;
|
MEMORYSTATUSEX ms;
|
||||||
ms.dwLength = sizeof(ms);
|
ms.dwLength = sizeof(ms);
|
||||||
if (GlobalMemoryStatusEx(&ms)) {
|
if (GlobalMemoryStatusEx(&ms)) {
|
||||||
qDebug().noquote() << QString("\tCurrent System Memory Usage: %1%").arg(ms.dwMemoryLoad);
|
qCDebug(shared).noquote()
|
||||||
qDebug().noquote() << QString("\tAvail Physical Memory: %1 MB").arg(ms.ullAvailPhys * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
<< QString("\tCurrent System Memory Usage: %1%").arg(ms.dwMemoryLoad);
|
||||||
qDebug().noquote() << QString("\tTotal Physical Memory: %1 MB").arg(ms.ullTotalPhys * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
qCDebug(shared).noquote()
|
||||||
qDebug().noquote() << QString("\tAvail in Page File: %1 MB").arg(ms.ullAvailPageFile * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
<< QString("\tAvail Physical Memory: %1 MB").arg(ms.ullAvailPhys * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
||||||
qDebug().noquote() << QString("\tTotal in Page File: %1 MB").arg(ms.ullTotalPageFile * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
qCDebug(shared).noquote()
|
||||||
qDebug().noquote() << QString("\tAvail Virtual Memory: %1 MB").arg(ms.ullAvailVirtual * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
<< QString("\tTotal Physical Memory: %1 MB").arg(ms.ullTotalPhys * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
||||||
qDebug().noquote() << QString("\tTotal Virtual Memory: %1 MB").arg(ms.ullTotalVirtual * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
qCDebug(shared).noquote()
|
||||||
|
<< QString("\tAvail in Page File: %1 MB").arg(ms.ullAvailPageFile * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
||||||
|
qCDebug(shared).noquote()
|
||||||
|
<< QString("\tTotal in Page File: %1 MB").arg(ms.ullTotalPageFile * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
||||||
|
qCDebug(shared).noquote()
|
||||||
|
<< QString("\tAvail Virtual Memory: %1 MB").arg(ms.ullAvailVirtual * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
||||||
|
qCDebug(shared).noquote()
|
||||||
|
<< QString("\tTotal Virtual Memory: %1 MB").arg(ms.ullTotalVirtual * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "\tFailed to retrieve memory status: " << GetLastError();
|
qCDebug(shared) << "\tFailed to retrieve memory status: " << GetLastError();
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "CPUID";
|
qCDebug(shared) << "CPUID";
|
||||||
|
|
||||||
qDebug() << "\tCPU Vendor: " << CPUIdent::Vendor().c_str();
|
qCDebug(shared) << "\tCPU Vendor: " << CPUIdent::Vendor().c_str();
|
||||||
qDebug() << "\tCPU Brand: " << CPUIdent::Brand().c_str();
|
qCDebug(shared) << "\tCPU Brand: " << CPUIdent::Brand().c_str();
|
||||||
|
|
||||||
for (auto& feature : CPUIdent::getAllFeatures()) {
|
for (auto& feature : CPUIdent::getAllFeatures()) {
|
||||||
qDebug().nospace().noquote() << "\t[" << (feature.supported ? "x" : " ") << "] " << feature.name.c_str();
|
qCDebug(shared).nospace().noquote() << "\t[" << (feature.supported ? "x" : " ") << "] " << feature.name.c_str();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
qDebug() << "Environment Variables";
|
qCDebug(shared) << "Environment Variables";
|
||||||
// List of env variables to include in the log. For privacy reasons we don't send all env variables.
|
// List of env variables to include in the log. For privacy reasons we don't send all env variables.
|
||||||
const QStringList envWhitelist = {
|
const QStringList envWhitelist = {
|
||||||
"QTWEBENGINE_REMOTE_DEBUGGING"
|
"QTWEBENGINE_REMOTE_DEBUGGING"
|
||||||
|
@ -840,7 +847,7 @@ void printSystemInformation() {
|
||||||
auto envVariables = QProcessEnvironment::systemEnvironment();
|
auto envVariables = QProcessEnvironment::systemEnvironment();
|
||||||
for (auto& env : envWhitelist)
|
for (auto& env : envWhitelist)
|
||||||
{
|
{
|
||||||
qDebug().noquote().nospace() << "\t" <<
|
qCDebug(shared).noquote().nospace() << "\t" <<
|
||||||
(envVariables.contains(env) ? " = " + envVariables.value(env) : " NOT FOUND");
|
(envVariables.contains(env) ? " = " + envVariables.value(env) : " NOT FOUND");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -869,4 +876,4 @@ bool getMemoryInfo(MemoryInfo& info) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue