remove some uncatagorized logging, suppress some categories by default

This commit is contained in:
Seth Alves 2018-04-20 12:01:40 -07:00
parent 4705472960
commit bec39369f7
10 changed files with 49 additions and 14 deletions

View file

@ -145,6 +145,14 @@
#include <avatars-renderer/ScriptAvatar.h> #include <avatars-renderer/ScriptAvatar.h>
#include <RenderableEntityItem.h> #include <RenderableEntityItem.h>
#include <AnimationLogging.h>
#include <AvatarLogging.h>
#include <ScriptEngineLogging.h>
#include <ModelFormatLogging.h>
#include <controllers/Logging.h>
#include <NetworkLogging.h>
#include <shared/StorageLogging.h>
#include "AudioClient.h" #include "AudioClient.h"
#include "audio/AudioScope.h" #include "audio/AudioScope.h"
#include "avatar/AvatarManager.h" #include "avatar/AvatarManager.h"
@ -1416,6 +1424,42 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
_overlays.init(); // do this before scripts load _overlays.init(); // do this before scripts load
DependencyManager::set<ContextOverlayInterface>(); DependencyManager::set<ContextOverlayInterface>();
// by default, suppress some of the logging
if (_verboseLoggin) {
const_cast<QLoggingCategory*>(&animation())->setEnabled(QtDebugMsg, false);
const_cast<QLoggingCategory*>(&animation())->setEnabled(QtInfoMsg, false);
const_cast<QLoggingCategory*>(&avatars())->setEnabled(QtDebugMsg, false);
const_cast<QLoggingCategory*>(&avatars())->setEnabled(QtInfoMsg, false);
const_cast<QLoggingCategory*>(&scriptengine())->setEnabled(QtDebugMsg, false);
const_cast<QLoggingCategory*>(&scriptengine())->setEnabled(QtInfoMsg, false);
const_cast<QLoggingCategory*>(&modelformat())->setEnabled(QtDebugMsg, false);
const_cast<QLoggingCategory*>(&modelformat())->setEnabled(QtInfoMsg, false);
const_cast<QLoggingCategory*>(&controllers())->setEnabled(QtDebugMsg, false);
const_cast<QLoggingCategory*>(&controllers())->setEnabled(QtInfoMsg, false);
const_cast<QLoggingCategory*>(&resourceLog())->setEnabled(QtDebugMsg, false);
const_cast<QLoggingCategory*>(&resourceLog())->setEnabled(QtInfoMsg, false);
const_cast<QLoggingCategory*>(&networking())->setEnabled(QtDebugMsg, false);
const_cast<QLoggingCategory*>(&networking())->setEnabled(QtInfoMsg, false);
const_cast<QLoggingCategory*>(&asset_client())->setEnabled(QtDebugMsg, false);
const_cast<QLoggingCategory*>(&asset_client())->setEnabled(QtInfoMsg, false);
// const_cast<QLoggingCategory*>(&entity_script_client())->setEnabled(QtDebugMsg, false);
// const_cast<QLoggingCategory*>(&entity_script_client())->setEnabled(QtInfoMsg, false);
const_cast<QLoggingCategory*>(&messages_client())->setEnabled(QtDebugMsg, false);
const_cast<QLoggingCategory*>(&messages_client())->setEnabled(QtInfoMsg, false);
const_cast<QLoggingCategory*>(&storagelogging())->setEnabled(QtDebugMsg, false);
const_cast<QLoggingCategory*>(&storagelogging())->setEnabled(QtInfoMsg, false);
}
// Make sure we don't time out during slow operations at startup // Make sure we don't time out during slow operations at startup
updateHeartbeat(); updateHeartbeat();
@ -2999,7 +3043,6 @@ void Application::handleSandboxStatus(QNetworkReply* reply) {
PROFILE_RANGE(render, __FUNCTION__); PROFILE_RANGE(render, __FUNCTION__);
bool sandboxIsRunning = SandboxUtils::readStatus(reply->readAll()); bool sandboxIsRunning = SandboxUtils::readStatus(reply->readAll());
qDebug() << "HandleSandboxStatus" << sandboxIsRunning;
enum HandControllerType { enum HandControllerType {
Vive, Vive,

View file

@ -718,5 +718,7 @@ private:
std::atomic<bool> _pendingIdleEvent { true }; std::atomic<bool> _pendingIdleEvent { true };
std::atomic<bool> _pendingRenderEvent { true }; std::atomic<bool> _pendingRenderEvent { true };
bool _verboseLogging { false };
}; };
#endif // hifi_Application_h #endif // hifi_Application_h

View file

@ -43,12 +43,10 @@ void ConnectionMonitor::init() {
} }
void ConnectionMonitor::startTimer() { void ConnectionMonitor::startTimer() {
qDebug() << "ConnectionMonitor: Starting timer";
_timer.start(DISPLAY_AFTER_DISCONNECTED_FOR_X_MS); _timer.start(DISPLAY_AFTER_DISCONNECTED_FOR_X_MS);
} }
void ConnectionMonitor::stopTimer() { void ConnectionMonitor::stopTimer() {
qDebug() << "ConnectionMonitor: Stopping timer";
_timer.stop(); _timer.stop();
DependencyManager::get<DialogsManager>()->setDomainConnectionFailureVisibility(false); DependencyManager::get<DialogsManager>()->setDomainConnectionFailureVisibility(false);
} }

View file

@ -108,11 +108,9 @@ AudioDeviceList::~AudioDeviceList() {
// store the selected device // store the selected device
foreach(std::shared_ptr<AudioDevice> adevice, _devices) { foreach(std::shared_ptr<AudioDevice> adevice, _devices) {
if (adevice->selectedDesktop) { if (adevice->selectedDesktop) {
qDebug() << "Saving Desktop for" << _mode << "name" << adevice->info.deviceName();
settingDesktop.set(adevice->info.deviceName()); settingDesktop.set(adevice->info.deviceName());
} }
if (adevice->selectedHMD) { if (adevice->selectedHMD) {
qDebug() << "Saving HMD for" << _mode << "name" << adevice->info.deviceName();
settingHMD.set(adevice->info.deviceName()); settingHMD.set(adevice->info.deviceName());
} }
} }
@ -311,7 +309,6 @@ void AudioDeviceList::onDevicesChanged(const QList<QAudioDeviceInfo>& devices) {
} }
} }
qDebug() << "adding audio device:" << device.display << device.selectedDesktop << device.selectedHMD << _mode;
newDevices.push_back(newDevice(device)); newDevices.push_back(newDevice(device));
} }

View file

@ -80,7 +80,6 @@ void DialogsManager::showFeed() {
} }
void DialogsManager::setDomainConnectionFailureVisibility(bool visible) { void DialogsManager::setDomainConnectionFailureVisibility(bool visible) {
qDebug() << "DialogsManager::setDomainConnectionFailureVisibility: visible" << visible;
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>(); auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system")); auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));

View file

@ -996,14 +996,12 @@ FBXGeometry* FBXReader::extractFBXGeometry(const QVariantHash& mapping, const QS
QByteArray filename = subobject.properties.at(0).toByteArray(); QByteArray filename = subobject.properties.at(0).toByteArray();
QByteArray filepath = filename.replace('\\', '/'); QByteArray filepath = filename.replace('\\', '/');
filename = fileOnUrl(filepath, url); filename = fileOnUrl(filepath, url);
qDebug() << "Filename" << filepath << filename;
_textureFilepaths.insert(getID(object.properties), filepath); _textureFilepaths.insert(getID(object.properties), filepath);
_textureFilenames.insert(getID(object.properties), filename); _textureFilenames.insert(getID(object.properties), filename);
} else if (subobject.name == "TextureName" && subobject.properties.length() >= TEXTURE_NAME_MIN_SIZE) { } else if (subobject.name == "TextureName" && subobject.properties.length() >= TEXTURE_NAME_MIN_SIZE) {
// trim the name from the timestamp // trim the name from the timestamp
QString name = QString(subobject.properties.at(0).toByteArray()); QString name = QString(subobject.properties.at(0).toByteArray());
name = name.left(name.indexOf('[')); name = name.left(name.indexOf('['));
qDebug() << "Filename" << name;
_textureNames.insert(getID(object.properties), name); _textureNames.insert(getID(object.properties), name);
} else if (subobject.name == "Texture_Alpha_Source" && subobject.properties.length() >= TEXTURE_ALPHA_SOURCE_MIN_SIZE) { } else if (subobject.name == "Texture_Alpha_Source" && subobject.properties.length() >= TEXTURE_ALPHA_SOURCE_MIN_SIZE) {
tex.assign<uint8_t>(tex.alphaSource, subobject.properties.at(0).value<int>()); tex.assign<uint8_t>(tex.alphaSource, subobject.properties.at(0).value<int>());

View file

@ -538,7 +538,6 @@ int ScriptEngines::runScriptInitializers(ScriptEnginePointer scriptEngine) {
int ii=0; int ii=0;
for (auto initializer : _scriptInitializers) { for (auto initializer : _scriptInitializers) {
ii++; ii++;
qDebug() << "initializer" << ii;
initializer(scriptEngine); initializer(scriptEngine);
} }
return ii; return ii;

View file

@ -22,6 +22,5 @@ namespace {
} }
void MiniPromise::registerMetaTypes(QObject* engine) { void MiniPromise::registerMetaTypes(QObject* engine) {
auto scriptEngine = qobject_cast<QScriptEngine*>(engine); auto scriptEngine = qobject_cast<QScriptEngine*>(engine);
qDebug() << "----------------------- MiniPromise::registerMetaTypes ------------" << scriptEngine;
qScriptRegisterMetaType(scriptEngine, promiseToScriptValue, promiseFromScriptValue); qScriptRegisterMetaType(scriptEngine, promiseToScriptValue, promiseFromScriptValue);
} }

View file

@ -10,7 +10,7 @@
#include <QtCore/QFileInfo> #include <QtCore/QFileInfo>
#include <QtCore/QDebug> #include <QtCore/QDebug>
#include <QtCore/QLoggingCategory> #include "StorageLogging.h"
Q_LOGGING_CATEGORY(storagelogging, "hifi.core.storage") Q_LOGGING_CATEGORY(storagelogging, "hifi.core.storage")
@ -102,4 +102,4 @@ FileStorage::~FileStorage() {
if (_file.isOpen()) { if (_file.isOpen()) {
_file.close(); _file.close();
} }
} }

View file

@ -102,7 +102,7 @@ class AudioHandler : public QObject, QRunnable {
public: public:
AudioHandler(OffscreenQmlSurface* surface, const QString& deviceName, QObject* parent = nullptr); AudioHandler(OffscreenQmlSurface* surface, const QString& deviceName, QObject* parent = nullptr);
virtual ~AudioHandler() { qDebug() << "Audio Handler Destroyed"; } virtual ~AudioHandler() { }
void run() override; void run() override;