mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-09 12:12:14 +02:00
catagorize some qDebugs
This commit is contained in:
parent
06b17995b1
commit
4470338663
24 changed files with 189 additions and 110 deletions
|
@ -154,7 +154,6 @@ ScrollingWindow {
|
|||
return i;
|
||||
}
|
||||
}
|
||||
console.warn("Could not find tab for " + source);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -189,7 +188,6 @@ ScrollingWindow {
|
|||
return i;
|
||||
}
|
||||
}
|
||||
console.warn("Could not find free tab");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -216,7 +214,6 @@ ScrollingWindow {
|
|||
|
||||
var existingTabIndex = findIndexForUrl(properties.source);
|
||||
if (existingTabIndex >= 0) {
|
||||
console.log("Existing tab " + existingTabIndex + " found with URL " + properties.source);
|
||||
var tab = tabView.getTab(existingTabIndex);
|
||||
return tab.item;
|
||||
}
|
||||
|
@ -239,16 +236,13 @@ ScrollingWindow {
|
|||
var tab = tabView.getTab(freeTabIndex);
|
||||
tab.title = properties.title || "Unknown";
|
||||
tab.enabled = true;
|
||||
console.log("New tab URL: " + properties.source)
|
||||
tab.originalUrl = properties.source;
|
||||
|
||||
var eventBridge = properties.eventBridge;
|
||||
console.log("Event bridge: " + eventBridge);
|
||||
|
||||
var result = tab.item;
|
||||
result.enabled = true;
|
||||
tabView.tabCount++;
|
||||
console.log("Setting event bridge: " + eventBridge);
|
||||
result.eventBridgeWrapper.eventBridge = eventBridge;
|
||||
result.url = properties.source;
|
||||
return result;
|
||||
|
|
|
@ -44,7 +44,6 @@ Item {
|
|||
webChannel.registeredObjects: [eventBridgeWrapper]
|
||||
|
||||
Component.onCompleted: {
|
||||
console.log("Connecting JS messaging to Hifi Logging");
|
||||
// Ensure the JS from the web-engine makes it to our logging
|
||||
root.javaScriptConsoleMessage.connect(function(level, message, lineNumber, sourceID) {
|
||||
console.log("Web Entity JS message: " + sourceID + " " + lineNumber + " " + message);
|
||||
|
|
|
@ -264,7 +264,7 @@ public:
|
|||
auto elapsedMovingAverage = _movingAverage.getAverage();
|
||||
|
||||
if (elapsedMovingAverage > _maxElapsedAverage) {
|
||||
qDebug() << "DEADLOCK WATCHDOG WARNING:"
|
||||
qCDebug(interfaceapp) << "DEADLOCK WATCHDOG WARNING:"
|
||||
<< "lastHeartbeatAge:" << lastHeartbeatAge
|
||||
<< "elapsedMovingAverage:" << elapsedMovingAverage
|
||||
<< "maxElapsed:" << _maxElapsed
|
||||
|
@ -274,7 +274,7 @@ public:
|
|||
_maxElapsedAverage = elapsedMovingAverage;
|
||||
}
|
||||
if (lastHeartbeatAge > _maxElapsed) {
|
||||
qDebug() << "DEADLOCK WATCHDOG WARNING:"
|
||||
qCDebug(interfaceapp) << "DEADLOCK WATCHDOG WARNING:"
|
||||
<< "lastHeartbeatAge:" << lastHeartbeatAge
|
||||
<< "elapsedMovingAverage:" << elapsedMovingAverage
|
||||
<< "PREVIOUS maxElapsed:" << _maxElapsed
|
||||
|
@ -284,7 +284,7 @@ public:
|
|||
_maxElapsed = lastHeartbeatAge;
|
||||
}
|
||||
if (elapsedMovingAverage > WARNING_ELAPSED_HEARTBEAT) {
|
||||
qDebug() << "DEADLOCK WATCHDOG WARNING:"
|
||||
qCDebug(interfaceapp) << "DEADLOCK WATCHDOG WARNING:"
|
||||
<< "lastHeartbeatAge:" << lastHeartbeatAge
|
||||
<< "elapsedMovingAverage:" << elapsedMovingAverage << "** OVER EXPECTED VALUE **"
|
||||
<< "maxElapsed:" << _maxElapsed
|
||||
|
@ -293,7 +293,7 @@ public:
|
|||
}
|
||||
|
||||
if (lastHeartbeatAge > MAX_HEARTBEAT_AGE_USECS) {
|
||||
qDebug() << "DEADLOCK DETECTED -- "
|
||||
qCDebug(interfaceapp) << "DEADLOCK DETECTED -- "
|
||||
<< "lastHeartbeatAge:" << lastHeartbeatAge
|
||||
<< "[ lastHeartbeat :" << lastHeartbeat
|
||||
<< "now:" << now << " ]"
|
||||
|
@ -2005,7 +2005,7 @@ void Application::resizeGL() {
|
|||
static qreal lastDevicePixelRatio = 0;
|
||||
qreal devicePixelRatio = _window->devicePixelRatio();
|
||||
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);
|
||||
_offscreenContext->makeCurrent();
|
||||
lastDevicePixelRatio = devicePixelRatio;
|
||||
|
@ -3260,17 +3260,17 @@ void Application::init() {
|
|||
|
||||
Setting::Handle<bool> firstRun { Settings::firstRun, true };
|
||||
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([](){
|
||||
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();
|
||||
},
|
||||
[](){
|
||||
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();
|
||||
});
|
||||
} 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);
|
||||
}
|
||||
|
||||
|
@ -5617,7 +5617,7 @@ void Application::setActiveDisplayPlugin(const QString& pluginName) {
|
|||
void Application::handleLocalServerConnection() const {
|
||||
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();
|
||||
|
||||
|
@ -5633,7 +5633,7 @@ void Application::readArgumentsFromLocalSocket() const {
|
|||
auto message = socket->readAll();
|
||||
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 (message.length() > 0) {
|
||||
|
@ -5735,8 +5735,8 @@ void Application::updateThreadPoolCount() const {
|
|||
auto reservedThreads = UI_RESERVED_THREADS + OS_RESERVED_THREADS + _displayPlugin->getRequiredThreadCount();
|
||||
auto availableThreads = QThread::idealThreadCount() - reservedThreads;
|
||||
auto threadPoolSize = std::max(MIN_PROCESSING_THREAD_POOL_SIZE, availableThreads);
|
||||
qDebug() << "Ideal Thread Count " << QThread::idealThreadCount();
|
||||
qDebug() << "Reserved threads " << reservedThreads;
|
||||
qDebug() << "Setting thread pool size to " << threadPoolSize;
|
||||
qCDebug(interfaceapp) << "Ideal Thread Count " << QThread::idealThreadCount();
|
||||
qCDebug(interfaceapp) << "Reserved threads " << reservedThreads;
|
||||
qCDebug(interfaceapp) << "Setting thread pool size to " << threadPoolSize;
|
||||
QThreadPool::globalInstance()->setMaxThreadCount(threadPoolSize);
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ AudioClient::~AudioClient() {
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -632,7 +632,7 @@ void AudioClient::selectAudioFormat(const QString& selectedCodecName) {
|
|||
|
||||
_selectedCodecName = selectedCodecName;
|
||||
|
||||
qDebug() << "Selected Codec:" << _selectedCodecName;
|
||||
qCDebug(audioclient) << "Selected Codec:" << _selectedCodecName;
|
||||
|
||||
// release any old codec encoder/decoder first...
|
||||
if (_codec && _encoder) {
|
||||
|
@ -648,7 +648,7 @@ void AudioClient::selectAudioFormat(const QString& selectedCodecName) {
|
|||
_codec = plugin;
|
||||
_receivedAudioStream.setupCodec(plugin, _selectedCodecName, AudioConstants::STEREO);
|
||||
_encoder = plugin->createEncoder(AudioConstants::SAMPLE_RATE, AudioConstants::MONO);
|
||||
qDebug() << "Selected Codec Plugin:" << _codec.get();
|
||||
qCDebug(audioclient) << "Selected Codec Plugin:" << _codec.get();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -997,21 +997,21 @@ void AudioClient::mixLocalAudioInjectors(float* mixBuffer) {
|
|||
|
||||
} else {
|
||||
|
||||
qDebug() << "injector has no more data, marking finished for removal";
|
||||
qCDebug(audioclient) << "injector has no more data, marking finished for removal";
|
||||
injector->finishLocalInjection();
|
||||
injectorsToRemove.append(injector);
|
||||
}
|
||||
|
||||
} 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();
|
||||
injectorsToRemove.append(injector);
|
||||
}
|
||||
}
|
||||
|
||||
for (AudioInjector* injector : injectorsToRemove) {
|
||||
qDebug() << "removing injector";
|
||||
qCDebug(audioclient) << "removing injector";
|
||||
getActiveLocalAudioInjectors().removeOne(injector);
|
||||
}
|
||||
}
|
||||
|
@ -1106,10 +1106,10 @@ bool AudioClient::outputLocalInjector(bool isStereo, AudioInjector* injector) {
|
|||
// Since this is invoked with invokeMethod, there _should_ be
|
||||
// no reason to lock access to the vector of injectors.
|
||||
if (!_activeLocalAudioInjectors.contains(injector)) {
|
||||
qDebug() << "adding new injector";
|
||||
qCDebug(audioclient) << "adding new injector";
|
||||
_activeLocalAudioInjectors.append(injector);
|
||||
} else {
|
||||
qDebug() << "injector exists in active list already";
|
||||
qCDebug(audioclient) << "injector exists in active list already";
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -1204,7 +1204,7 @@ bool AudioClient::switchInputToAudioDevice(const QAudioDeviceInfo& inputDeviceIn
|
|||
void AudioClient::outputNotify() {
|
||||
int recentUnfulfilled = _audioOutputIODevice.getRecentUnfulfilledReads();
|
||||
if (recentUnfulfilled > 0) {
|
||||
qCInfo(audioclient, "Starve detected, %d new unfulfilled reads", recentUnfulfilled);
|
||||
qCDebug(audioclient, "Starve detected, %d new unfulfilled reads", recentUnfulfilled);
|
||||
|
||||
if (_outputStarveDetectionEnabled.get()) {
|
||||
quint64 now = usecTimestampNow() / 1000;
|
||||
|
@ -1219,7 +1219,8 @@ void AudioClient::outputNotify() {
|
|||
int newOutputBufferSizeFrames = setOutputBufferSize(oldOutputBufferSizeFrames + 1, false);
|
||||
|
||||
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;
|
||||
|
@ -1460,10 +1461,10 @@ void AudioClient::loadSettings() {
|
|||
_receivedAudioStream.setWindowSecondsForDesiredReduction(windowSecondsForDesiredReduction.get());
|
||||
_receivedAudioStream.setRepetitionWithFade(repetitionWithFade.get());
|
||||
|
||||
qDebug() << "---- Initializing Audio Client ----";
|
||||
qCDebug(audioclient) << "---- Initializing Audio Client ----";
|
||||
auto codecPlugins = PluginManager::getInstance()->getCodecPlugins();
|
||||
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)) {
|
||||
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);
|
||||
_mappingsByName[mappingName] = mapping;
|
||||
return mapping;
|
||||
|
@ -1121,15 +1121,15 @@ Mapping::Pointer UserInputMapper::parseMapping(const QString& json) {
|
|||
QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8(), &error);
|
||||
// check validity of the document
|
||||
if (doc.isNull()) {
|
||||
qDebug() << "Invalid JSON...\n";
|
||||
qDebug() << error.errorString();
|
||||
qDebug() << "JSON was:\n" << json << endl;
|
||||
qCDebug(controllers) << "Invalid JSON...\n";
|
||||
qCDebug(controllers) << error.errorString();
|
||||
qCDebug(controllers) << "JSON was:\n" << json << endl;
|
||||
return Mapping::Pointer();
|
||||
}
|
||||
|
||||
if (!doc.isObject()) {
|
||||
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 parseMapping(doc.object());
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <QtCore/QFileInfo>
|
||||
|
||||
#include <shared/NsightHelpers.h>
|
||||
#include "ModelFormatLogging.h"
|
||||
|
||||
template<class T> int streamSize() {
|
||||
return sizeof(T);
|
||||
|
@ -356,7 +357,7 @@ FBXNode FBXReader::parseFBX(QIODevice* device) {
|
|||
quint32 fileVersion;
|
||||
in >> fileVersion;
|
||||
position += sizeof(fileVersion);
|
||||
qDebug() << "fileVersion:" << fileVersion;
|
||||
qCDebug(modelformat) << "fileVersion:" << fileVersion;
|
||||
bool has64BitPositions = (fileVersion >= VERSION_FBX2016);
|
||||
|
||||
// parse the top-level node
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#include <QtGui/QGuiApplication>
|
||||
|
||||
#include <GLMHelpers.h>
|
||||
#include "GLLogging.h"
|
||||
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
||||
|
@ -111,7 +113,7 @@ void GLAPIENTRY debugMessageCallback(GLenum source, GLenum type, GLuint id, GLen
|
|||
if (GL_DEBUG_SEVERITY_NOTIFICATION == severity) {
|
||||
return;
|
||||
}
|
||||
qDebug() << "QQQ " << message;
|
||||
qCDebug(glLogging) << "QQQ " << message;
|
||||
}
|
||||
|
||||
// FIXME build the PFD based on the
|
||||
|
|
|
@ -65,7 +65,7 @@ class Context {
|
|||
QWindow* _window { nullptr };
|
||||
public:
|
||||
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 "GLHelpers.h"
|
||||
#include "GLLogging.h"
|
||||
|
||||
void GLWindow::createContext(QOpenGLContext* shareContext) {
|
||||
createContext(getDefaultOpenGLSurfaceFormat(), shareContext);
|
||||
|
@ -41,10 +42,10 @@ bool GLWindow::makeCurrent() {
|
|||
Q_ASSERT(makeCurrentResult);
|
||||
|
||||
std::call_once(_reportOnce, []{
|
||||
qDebug() << "GL Version: " << QString((const char*) glGetString(GL_VERSION));
|
||||
qDebug() << "GL Shader Language Version: " << QString((const char*) glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||
qDebug() << "GL Vendor: " << QString((const char*) glGetString(GL_VENDOR));
|
||||
qDebug() << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER));
|
||||
qCDebug(glLogging) << "GL Version: " << QString((const char*) glGetString(GL_VERSION));
|
||||
qCDebug(glLogging) << "GL Shader Language Version: " << QString((const char*) glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||
qCDebug(glLogging) << "GL Vendor: " << QString((const char*) glGetString(GL_VENDOR));
|
||||
qCDebug(glLogging) << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER));
|
||||
});
|
||||
|
||||
Q_ASSERT(_context == QOpenGLContext::currentContext());
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
#include <QtGui/QOpenGLContext>
|
||||
|
||||
#include "GLHelpers.h"
|
||||
#include "GLLogging.h"
|
||||
|
||||
|
||||
OffscreenGLCanvas::OffscreenGLCanvas() : _context(new QOpenGLContext), _offscreenSurface(new QOffscreenSurface){
|
||||
}
|
||||
|
@ -56,10 +58,10 @@ bool OffscreenGLCanvas::makeCurrent() {
|
|||
Q_ASSERT(result);
|
||||
|
||||
std::call_once(_reportOnce, [this]{
|
||||
qDebug() << "GL Version: " << QString((const char*) glGetString(GL_VERSION));
|
||||
qDebug() << "GL Shader Language Version: " << QString((const char*) glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||
qDebug() << "GL Vendor: " << QString((const char*) glGetString(GL_VENDOR));
|
||||
qDebug() << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER));
|
||||
qCDebug(glLogging) << "GL Version: " << QString((const char*) glGetString(GL_VERSION));
|
||||
qCDebug(glLogging) << "GL Shader Language Version: " << QString((const char*) glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||
qCDebug(glLogging) << "GL Vendor: " << QString((const char*) glGetString(GL_VENDOR));
|
||||
qCDebug(glLogging) << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER));
|
||||
});
|
||||
|
||||
return result;
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "OffscreenGLCanvas.h"
|
||||
#include "GLEscrow.h"
|
||||
#include "GLHelpers.h"
|
||||
#include "GLLogging.h"
|
||||
|
||||
|
||||
QString fixupHifiUrl(const QString& urlString) {
|
||||
|
@ -196,7 +197,7 @@ QEvent* OffscreenQmlRenderThread::Queue::take() {
|
|||
|
||||
OffscreenQmlRenderThread::OffscreenQmlRenderThread(OffscreenQmlSurface* surface, QOpenGLContext* shareContext) : _surface(surface) {
|
||||
_canvas.setObjectName("OffscreenQmlRenderCanvas");
|
||||
qDebug() << "Building QML Renderer";
|
||||
qCDebug(glLogging) << "Building QML Renderer";
|
||||
if (!_canvas.create(shareContext)) {
|
||||
qWarning("Failed to create OffscreenGLCanvas");
|
||||
_quit = true;
|
||||
|
@ -223,7 +224,7 @@ OffscreenQmlRenderThread::OffscreenQmlRenderThread(OffscreenQmlSurface* surface,
|
|||
}
|
||||
|
||||
void OffscreenQmlRenderThread::run() {
|
||||
qDebug() << "Starting QML Renderer thread";
|
||||
qCDebug(glLogging) << "Starting QML Renderer thread";
|
||||
|
||||
while (!_quit) {
|
||||
QEvent* e = _queue.take();
|
||||
|
@ -282,7 +283,7 @@ QJsonObject OffscreenQmlRenderThread::getGLContextData() {
|
|||
}
|
||||
|
||||
void OffscreenQmlRenderThread::init() {
|
||||
qDebug() << "Initializing QML Renderer";
|
||||
qCDebug(glLogging) << "Initializing QML Renderer";
|
||||
|
||||
if (!_canvas.makeCurrent()) {
|
||||
qWarning("Failed to make context current on QML Renderer Thread");
|
||||
|
@ -341,7 +342,7 @@ void OffscreenQmlRenderThread::resize() {
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -426,7 +427,7 @@ OffscreenQmlSurface::~OffscreenQmlSurface() {
|
|||
QObject::disconnect(&_updateTimer);
|
||||
QObject::disconnect(qApp);
|
||||
|
||||
qDebug() << "Stopping QML Renderer Thread " << _renderer->currentThreadId();
|
||||
qCDebug(glLogging) << "Stopping QML Renderer Thread " << _renderer->currentThreadId();
|
||||
_renderer->_queue.add(STOP);
|
||||
if (!_renderer->wait(MAX_SHUTDOWN_WAIT_SECS * USECS_PER_SECOND)) {
|
||||
qWarning() << "Failed to shut down the QML Renderer Thread";
|
||||
|
@ -443,7 +444,7 @@ void OffscreenQmlSurface::onAboutToQuit() {
|
|||
}
|
||||
|
||||
void OffscreenQmlSurface::create(QOpenGLContext* shareContext) {
|
||||
qDebug() << "Building QML surface";
|
||||
qCDebug(glLogging) << "Building QML surface";
|
||||
|
||||
_renderer = new OffscreenQmlRenderThread(this, shareContext);
|
||||
_renderer->moveToThread(_renderer);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <set>
|
||||
#include <oglplus/shapes/plane.hpp>
|
||||
#include <oglplus/shapes/sky_box.hpp>
|
||||
#include "GLLogging.h"
|
||||
|
||||
using namespace oglplus;
|
||||
using namespace oglplus::shapes;
|
||||
|
@ -190,7 +191,7 @@ public:
|
|||
const int stacks_) {
|
||||
//UV mapping source: http://www.mvps.org/directx/articles/spheremap.htm
|
||||
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_);
|
||||
|
|
|
@ -44,10 +44,10 @@ BackendPointer GLBackend::createBackend() {
|
|||
auto version = QOpenGLContextWrapper::currentContextVersion();
|
||||
std::shared_ptr<GLBackend> result;
|
||||
if (!disableOpenGL45 && version >= 0x0405) {
|
||||
qDebug() << "Using OpenGL 4.5 backend";
|
||||
qCDebug(gpugllogging) << "Using OpenGL 4.5 backend";
|
||||
result = std::make_shared<gpu::gl45::GL45Backend>();
|
||||
} else {
|
||||
qDebug() << "Using OpenGL 4.1 backend";
|
||||
qCDebug(gpugllogging) << "Using OpenGL 4.1 backend";
|
||||
result = std::make_shared<gpu::gl41::GL41Backend>();
|
||||
}
|
||||
result->initInput();
|
||||
|
|
|
@ -765,7 +765,7 @@ void AddressManager::handleShareableNameAPIResponse(QNetworkReply& requestReply)
|
|||
}
|
||||
|
||||
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->setCacheDirectory(cachePath);
|
||||
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)";
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ void AssetClient::clearCache() {
|
|||
}
|
||||
|
||||
if (auto cache = NetworkAccessManager::getInstance().cache()) {
|
||||
qDebug() << "AssetClient::clearCache(): Clearing disk cache.";
|
||||
qInfo() << "AssetClient::clearCache(): Clearing disk cache.";
|
||||
cache->clear();
|
||||
} else {
|
||||
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());
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ qint64 LimitedNodeList::sendPacketList(NLPacketList& packetList, const Node& des
|
|||
emit dataSent(destinationNode.getType(), bytesSent);
|
||||
return bytesSent;
|
||||
} else {
|
||||
qDebug() << "LimitedNodeList::sendPacketList called without active socket for node" << destinationNode
|
||||
qCDebug(networking) << "LimitedNodeList::sendPacketList called without active socket for node" << destinationNode
|
||||
<< " - not sending.";
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -322,7 +322,8 @@ void PhysicalEntitySimulation::addAction(EntityActionPointer action) {
|
|||
QMutexLocker lock(&_mutex);
|
||||
const QUuid& actionID = action->getID();
|
||||
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);
|
||||
|
|
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 "DisplayPlugin.h"
|
||||
#include "InputPlugin.h"
|
||||
#include "PluginLogging.h"
|
||||
|
||||
|
||||
PluginManager* PluginManager::getInstance() {
|
||||
|
@ -87,10 +88,10 @@ const LoaderList& getLoadedPlugins() {
|
|||
QDir pluginDir(pluginPath);
|
||||
pluginDir.setFilter(QDir::Files);
|
||||
if (pluginDir.exists()) {
|
||||
qDebug() << "Loading runtime plugins from " << pluginPath;
|
||||
qInfo() << "Loading runtime plugins from " << pluginPath;
|
||||
auto candidates = pluginDir.entryList();
|
||||
for (auto plugin : candidates) {
|
||||
qDebug() << "Attempting plugin" << qPrintable(plugin);
|
||||
qCDebug(plugins) << "Attempting plugin" << qPrintable(plugin);
|
||||
QSharedPointer<QPluginLoader> loader(new QPluginLoader(pluginPath + plugin));
|
||||
|
||||
if (isDisabled(loader->metaData())) {
|
||||
|
@ -100,11 +101,11 @@ const LoaderList& getLoadedPlugins() {
|
|||
}
|
||||
|
||||
if (loader->load()) {
|
||||
qDebug() << "Plugin" << qPrintable(plugin) << "loaded successfully";
|
||||
qCDebug(plugins) << "Plugin" << qPrintable(plugin) << "loaded successfully";
|
||||
loadedPlugins.push_back(loader);
|
||||
} else {
|
||||
qDebug() << "Plugin" << qPrintable(plugin) << "failed to load:";
|
||||
qDebug() << " " << qPrintable(loader->errorString());
|
||||
qCDebug(plugins) << "Plugin" << qPrintable(plugin) << "failed to load:";
|
||||
qCDebug(plugins) << " " << qPrintable(loader->errorString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -139,7 +140,7 @@ const CodecPluginList& PluginManager::getCodecPlugins() {
|
|||
plugin->setContainer(_container);
|
||||
plugin->init();
|
||||
|
||||
qDebug() << "init codec:" << plugin->getName();
|
||||
qCDebug(plugins) << "init codec:" << plugin->getName();
|
||||
}
|
||||
});
|
||||
return codecPlugins;
|
||||
|
@ -157,11 +158,11 @@ static DisplayPluginList displayPlugins;
|
|||
const DisplayPluginList& PluginManager::getDisplayPlugins() {
|
||||
static std::once_flag once;
|
||||
static auto deviceAddedCallback = [](QString deviceName) {
|
||||
qDebug() << "Added device: " << deviceName;
|
||||
qCDebug(plugins) << "Added device: " << deviceName;
|
||||
UserActivityLogger::getInstance().connectedDevice("display", deviceName);
|
||||
};
|
||||
static auto subdeviceAddedCallback = [](QString pluginName, QString deviceName) {
|
||||
qDebug() << "Added subdevice: " << deviceName;
|
||||
qCDebug(plugins) << "Added subdevice: " << deviceName;
|
||||
UserActivityLogger::getInstance().connectedDevice("display", pluginName + " | " + deviceName);
|
||||
};
|
||||
|
||||
|
@ -204,11 +205,11 @@ const InputPluginList& PluginManager::getInputPlugins() {
|
|||
static InputPluginList inputPlugins;
|
||||
static std::once_flag once;
|
||||
static auto deviceAddedCallback = [](QString deviceName) {
|
||||
qDebug() << "Added device: " << deviceName;
|
||||
qCDebug(plugins) << "Added device: " << deviceName;
|
||||
UserActivityLogger::getInstance().connectedDevice("input", deviceName);
|
||||
};
|
||||
static auto subdeviceAddedCallback = [](QString pluginName, QString deviceName) {
|
||||
qDebug() << "Added subdevice: " << deviceName;
|
||||
qCDebug(plugins) << "Added subdevice: " << deviceName;
|
||||
UserActivityLogger::getInstance().connectedDevice("input", pluginName + " | " + deviceName);
|
||||
};
|
||||
|
||||
|
|
|
@ -121,7 +121,9 @@ bool Procedural::parseShader(const QUrl& shaderPath) {
|
|||
|
||||
if (_shaderUrl.isLocalFile()) {
|
||||
_shaderPath = _shaderUrl.toLocalFile();
|
||||
#if WANT_DEBUG
|
||||
qDebug() << "Shader path: " << _shaderPath;
|
||||
#endif
|
||||
if (!QFile(_shaderPath).exists()) {
|
||||
_networkShader.reset();
|
||||
return false;;
|
||||
|
|
|
@ -767,72 +767,79 @@ void disableQtBearerPoll() {
|
|||
|
||||
void printSystemInformation() {
|
||||
// Write system information to log
|
||||
qDebug() << "Build Information";
|
||||
qDebug().noquote() << "\tBuild ABI: " << QSysInfo::buildAbi();
|
||||
qDebug().noquote() << "\tBuild CPU Architecture: " << QSysInfo::buildCpuArchitecture();
|
||||
qCDebug(shared) << "Build Information";
|
||||
qCDebug(shared).noquote() << "\tBuild ABI: " << QSysInfo::buildAbi();
|
||||
qCDebug(shared).noquote() << "\tBuild CPU Architecture: " << QSysInfo::buildCpuArchitecture();
|
||||
|
||||
qDebug().noquote() << "System Information";
|
||||
qDebug().noquote() << "\tProduct Name: " << QSysInfo::prettyProductName();
|
||||
qDebug().noquote() << "\tCPU Architecture: " << QSysInfo::currentCpuArchitecture();
|
||||
qDebug().noquote() << "\tKernel Type: " << QSysInfo::kernelType();
|
||||
qDebug().noquote() << "\tKernel Version: " << QSysInfo::kernelVersion();
|
||||
qCDebug(shared).noquote() << "System Information";
|
||||
qCDebug(shared).noquote() << "\tProduct Name: " << QSysInfo::prettyProductName();
|
||||
qCDebug(shared).noquote() << "\tCPU Architecture: " << QSysInfo::currentCpuArchitecture();
|
||||
qCDebug(shared).noquote() << "\tKernel Type: " << QSysInfo::kernelType();
|
||||
qCDebug(shared).noquote() << "\tKernel Version: " << QSysInfo::kernelVersion();
|
||||
|
||||
auto macVersion = QSysInfo::macVersion();
|
||||
if (macVersion != QSysInfo::MV_None) {
|
||||
qDebug() << "\tMac Version: " << macVersion;
|
||||
qCDebug(shared) << "\tMac Version: " << macVersion;
|
||||
}
|
||||
|
||||
auto windowsVersion = QSysInfo::windowsVersion();
|
||||
if (windowsVersion != QSysInfo::WV_None) {
|
||||
qDebug() << "\tWindows Version: " << windowsVersion;
|
||||
qCDebug(shared) << "\tWindows Version: " << windowsVersion;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
SYSTEM_INFO si;
|
||||
GetNativeSystemInfo(&si);
|
||||
|
||||
qDebug() << "SYSTEM_INFO";
|
||||
qDebug().noquote() << "\tOEM ID: " << si.dwOemId;
|
||||
qDebug().noquote() << "\tProcessor Architecture: " << si.wProcessorArchitecture;
|
||||
qDebug().noquote() << "\tProcessor Type: " << si.dwProcessorType;
|
||||
qDebug().noquote() << "\tProcessor Level: " << si.wProcessorLevel;
|
||||
qDebug().noquote() << "\tProcessor Revision: "
|
||||
qCDebug(shared) << "SYSTEM_INFO";
|
||||
qCDebug(shared).noquote() << "\tOEM ID: " << si.dwOemId;
|
||||
qCDebug(shared).noquote() << "\tProcessor Architecture: " << si.wProcessorArchitecture;
|
||||
qCDebug(shared).noquote() << "\tProcessor Type: " << si.dwProcessorType;
|
||||
qCDebug(shared).noquote() << "\tProcessor Level: " << si.wProcessorLevel;
|
||||
qCDebug(shared).noquote() << "\tProcessor Revision: "
|
||||
<< QString("0x%1").arg(si.wProcessorRevision, 4, 16, QChar('0'));
|
||||
qDebug().noquote() << "\tNumber of Processors: " << si.dwNumberOfProcessors;
|
||||
qDebug().noquote() << "\tPage size: " << si.dwPageSize << " Bytes";
|
||||
qDebug().noquote() << "\tMin Application Address: "
|
||||
qCDebug(shared).noquote() << "\tNumber of Processors: " << si.dwNumberOfProcessors;
|
||||
qCDebug(shared).noquote() << "\tPage size: " << si.dwPageSize << " Bytes";
|
||||
qCDebug(shared).noquote() << "\tMin Application Address: "
|
||||
<< 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'));
|
||||
|
||||
const double BYTES_TO_MEGABYTE = 1.0 / (1024 * 1024);
|
||||
|
||||
qDebug() << "MEMORYSTATUSEX";
|
||||
qCDebug(shared) << "MEMORYSTATUSEX";
|
||||
MEMORYSTATUSEX ms;
|
||||
ms.dwLength = sizeof(ms);
|
||||
if (GlobalMemoryStatusEx(&ms)) {
|
||||
qDebug().noquote() << QString("\tCurrent System Memory Usage: %1%").arg(ms.dwMemoryLoad);
|
||||
qDebug().noquote() << QString("\tAvail Physical Memory: %1 MB").arg(ms.ullAvailPhys * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
||||
qDebug().noquote() << QString("\tTotal Physical Memory: %1 MB").arg(ms.ullTotalPhys * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
||||
qDebug().noquote() << QString("\tAvail in Page File: %1 MB").arg(ms.ullAvailPageFile * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
||||
qDebug().noquote() << QString("\tTotal in Page File: %1 MB").arg(ms.ullTotalPageFile * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
||||
qDebug().noquote() << QString("\tAvail Virtual Memory: %1 MB").arg(ms.ullAvailVirtual * 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("\tCurrent System Memory Usage: %1%").arg(ms.dwMemoryLoad);
|
||||
qCDebug(shared).noquote()
|
||||
<< QString("\tAvail Physical Memory: %1 MB").arg(ms.ullAvailPhys * BYTES_TO_MEGABYTE, 20, 'f', 2);
|
||||
qCDebug(shared).noquote()
|
||||
<< QString("\tTotal Physical Memory: %1 MB").arg(ms.ullTotalPhys * 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 {
|
||||
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();
|
||||
qDebug() << "\tCPU Brand: " << CPUIdent::Brand().c_str();
|
||||
qCDebug(shared) << "\tCPU Vendor: " << CPUIdent::Vendor().c_str();
|
||||
qCDebug(shared) << "\tCPU Brand: " << CPUIdent::Brand().c_str();
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
const QStringList envWhitelist = {
|
||||
"QTWEBENGINE_REMOTE_DEBUGGING"
|
||||
|
@ -840,7 +847,7 @@ void printSystemInformation() {
|
|||
auto envVariables = QProcessEnvironment::systemEnvironment();
|
||||
for (auto& env : envWhitelist)
|
||||
{
|
||||
qDebug().noquote().nospace() << "\t" <<
|
||||
qCDebug(shared).noquote().nospace() << "\t" <<
|
||||
(envVariables.contains(env) ? " = " + envVariables.value(env) : " NOT FOUND");
|
||||
}
|
||||
}
|
||||
|
@ -869,4 +876,4 @@ bool getMemoryInfo(MemoryInfo& info) {
|
|||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue