Mercurial > hg > svcore
changeset 1885:1adbeb52d761
Make some debug output less obvious
author | Chris Cannam |
---|---|
date | Fri, 14 Aug 2020 10:42:37 +0100 |
parents | bdab3a921d5d |
children | f803d3c33f76 |
files | plugin/DSSIPluginFactory.cpp plugin/LADSPAPluginFactory.cpp rdf/PluginRDFDescription.cpp |
diffstat | 3 files changed, 26 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/plugin/DSSIPluginFactory.cpp Tue Jul 21 13:59:29 2020 +0100 +++ b/plugin/DSSIPluginFactory.cpp Fri Aug 14 10:42:37 2020 +0100 @@ -161,7 +161,7 @@ if (m_libraryHandles.find(soname) == m_libraryHandles.end()) { loadLibrary(soname); if (m_libraryHandles.find(soname) == m_libraryHandles.end()) { - cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: loadLibrary failed for " << soname << endl; + SVCERR << "WARNING: DSSIPluginFactory::getDSSIDescriptor: loadLibrary failed for " << soname << endl; return nullptr; } firstInLibrary = true; @@ -173,7 +173,7 @@ DLSYM(libraryHandle, "dssi_descriptor"); if (!fn) { - cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No descriptor function in library " << soname << endl; + SVCERR << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No descriptor function in library " << soname << endl; return nullptr; } @@ -190,7 +190,7 @@ ++index; } - cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No such plugin as " << label << " in library " << soname << endl; + SVCERR << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No such plugin as " << label << " in library " << soname << endl; return nullptr; } @@ -296,7 +296,7 @@ void *libraryHandle = DLOPEN(soname, RTLD_LAZY); if (!libraryHandle) { - cerr << "WARNING: DSSIPluginFactory::discoverPlugins: couldn't load plugin library " + SVCERR << "WARNING: DSSIPluginFactory::discoverPlugins: couldn't load plugin library " << soname << " - " << DLERROR() << endl; return; } @@ -305,7 +305,7 @@ DLSYM(libraryHandle, "dssi_descriptor"); if (!fn) { - cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No descriptor function in " << soname << endl; + SVCERR << "WARNING: DSSIPluginFactory::discoverPlugins: No descriptor function in " << soname << endl; return; } @@ -316,7 +316,7 @@ const LADSPA_Descriptor *ladspaDescriptor = descriptor->LADSPA_Plugin; if (!ladspaDescriptor) { - cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No LADSPA descriptor for plugin " << index << " in " << soname << endl; + SVCERR << "WARNING: DSSIPluginFactory::discoverPlugins: No LADSPA descriptor for plugin " << index << " in " << soname << endl; ++index; continue; } @@ -363,7 +363,7 @@ rtd.category = category.toStdString(); -// cerr << "Plugin id is " << ladspaDescriptor->UniqueID +// SVCERR << "Plugin id is " << ladspaDescriptor->UniqueID // << ", identifier is \"" << identifier // << "\", category is \"" << category // << "\", name is " << ladspaDescriptor->Name @@ -385,7 +385,7 @@ for (int j = 0; j < (int)defs->count; j++) { if (defs->items[j].pid == controlPortNumber) { -// cerr << "Default for this port (" << defs->items[j].pid << ", " << defs->items[j].label << ") is " << defs->items[j].value << "; applying this to port number " << i << " with name " << ladspaDescriptor->PortNames[i] << endl; +// SVCERR << "Default for this port (" << defs->items[j].pid << ", " << defs->items[j].label << ") is " << defs->items[j].value << "; applying this to port number " << i << " with name " << ladspaDescriptor->PortNames[i] << endl; m_portDefaults[ladspaDescriptor->UniqueID][i] = defs->items[j].value; } @@ -428,7 +428,7 @@ } if (DLCLOSE(libraryHandle) != 0) { - cerr << "WARNING: DSSIPluginFactory::discoverPlugins - can't unload " << libraryHandle << endl; + SVCERR << "WARNING: DSSIPluginFactory::discoverPlugins - can't unload " << libraryHandle << endl; return; } }
--- a/plugin/LADSPAPluginFactory.cpp Tue Jul 21 13:59:29 2020 +0100 +++ b/plugin/LADSPAPluginFactory.cpp Fri Aug 14 10:42:37 2020 +0100 @@ -81,7 +81,7 @@ const LADSPA_Descriptor *descriptor = getLADSPADescriptor(*i); if (!descriptor) { - cerr << "WARNING: LADSPAPluginFactory::enumeratePlugins: couldn't get descriptor for identifier " << *i << endl; + SVCERR << "WARNING: LADSPAPluginFactory::enumeratePlugins: couldn't get descriptor for identifier " << *i << endl; continue; } @@ -95,11 +95,11 @@ list.push_back("false"); // is grouped if (m_taxonomy.find(*i) != m_taxonomy.end() && m_taxonomy[*i] != "") { -// cerr << "LADSPAPluginFactory: cat for " << *i << " found in taxonomy as " << m_taxonomy[descriptor->UniqueID] << endl; +// SVCERR << "LADSPAPluginFactory: cat for " << *i << " found in taxonomy as " << m_taxonomy[descriptor->UniqueID] << endl; list.push_back(m_taxonomy[*i]); } else { list.push_back(""); -// cerr << "LADSPAPluginFactory: cat for " << *i << " not found (despite having " << m_fallbackCategories.size() << " fallbacks)" << endl; +// SVCERR << "LADSPAPluginFactory: cat for " << *i << " not found (despite having " << m_fallbackCategories.size() << " fallbacks)" << endl; } @@ -618,7 +618,7 @@ QDir dir(lrdfPaths[i], "*.rdf;*.rdfs"); for (unsigned int j = 0; j < dir.count(); ++j) { if (!lrdf_read_file(QString("file:" + lrdfPaths[i] + "/" + dir[j]).toStdString().c_str())) { -// cerr << "LADSPAPluginFactory: read RDF file " << (lrdfPaths[i] + "/" + dir[j]) << endl; +// SVCERR << "LADSPAPluginFactory: read RDF file " << (lrdfPaths[i] + "/" + dir[j]) << endl; haveSomething = true; } } @@ -645,7 +645,7 @@ void *libraryHandle = DLOPEN(soname, RTLD_LAZY); if (!libraryHandle) { - cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: couldn't load plugin library " + SVCERR << "WARNING: LADSPAPluginFactory::discoverPlugins: couldn't load plugin library " << soname << " - " << DLERROR() << endl; return; } @@ -654,7 +654,7 @@ DLSYM(libraryHandle, "ladspa_descriptor"); if (!fn) { - cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: No descriptor function in " << soname << endl; + SVCERR << "WARNING: LADSPAPluginFactory::discoverPlugins: No descriptor function in " << soname << endl; return; } @@ -684,7 +684,7 @@ if (m_lrdfTaxonomy[descriptor->UniqueID] != "") { m_taxonomy[identifier] = m_lrdfTaxonomy[descriptor->UniqueID]; -// cerr << "set id \"" << identifier << "\" to cat \"" << m_taxonomy[identifier] << "\" from LRDF" << endl; +// SVCERR << "set id \"" << identifier << "\" to cat \"" << m_taxonomy[identifier] << "\" from LRDF" << endl; // cout << identifier << "::" << m_taxonomy[identifier] << endl; } @@ -701,7 +701,7 @@ rtd.category = category.toStdString(); -// cerr << "Plugin id is " << descriptor->UniqueID +// SVCERR << "Plugin id is " << descriptor->UniqueID // << ", category is \"" << (category ? category : QString("(none)")) // << "\", name is " << descriptor->Name // << ", label is " << descriptor->Label @@ -722,7 +722,7 @@ for (unsigned int j = 0; j < defs->count; j++) { if (defs->items[j].pid == controlPortNumber) { -// cerr << "Default for this port (" << defs->items[j].pid << ", " << defs->items[j].label << ") is " << defs->items[j].value << "; applying this to port number " << i << " with name " << descriptor->PortNames[i] << endl; +// SVCERR << "Default for this port (" << defs->items[j].pid << ", " << defs->items[j].label << ") is " << defs->items[j].value << "; applying this to port number " << i << " with name " << descriptor->PortNames[i] << endl; m_portDefaults[descriptor->UniqueID][i] = defs->items[j].value; } @@ -765,7 +765,7 @@ } if (DLCLOSE(libraryHandle) != 0) { - cerr << "WARNING: LADSPAPluginFactory::discoverPlugins - can't unload " << libraryHandle << endl; + SVCERR << "WARNING: LADSPAPluginFactory::discoverPlugins - can't unload " << libraryHandle << endl; return; } }
--- a/rdf/PluginRDFDescription.cpp Tue Jul 21 13:59:29 2020 +0100 +++ b/rdf/PluginRDFDescription.cpp Fri Aug 14 10:42:37 2020 +0100 @@ -18,6 +18,7 @@ #include "PluginRDFIndexer.h" #include "base/Profiler.h" +#include "base/Debug.h" #include "plugin/PluginIdentifier.h" @@ -41,7 +42,7 @@ PluginRDFIndexer *indexer = PluginRDFIndexer::getInstance(); m_pluginUri = indexer->getURIForPluginId(pluginId); if (m_pluginUri == "") { - cerr << "PluginRDFDescription: WARNING: No RDF description available for plugin ID \"" + SVDEBUG << "PluginRDFDescription: WARNING: No RDF description available for plugin ID \"" << pluginId << "\"" << endl; } else { // All the data we need should be in our RDF model already: @@ -344,7 +345,7 @@ (Triple(plugin, index->expand("vamp:output"), Node())).objects(); if (outputs.empty()) { - cerr << "ERROR: PluginRDFDescription::indexURL: NOTE: No outputs defined for <" + SVDEBUG << "ERROR: PluginRDFDescription::indexURL: NOTE: No outputs defined for <" << m_pluginUri << ">" << endl; return false; } @@ -353,13 +354,13 @@ if ((output.type != Node::URI && output.type != Node::Blank) || output.value == "") { - cerr << "ERROR: PluginRDFDescription::indexURL: No valid URI for output " << output << " of plugin <" << m_pluginUri << ">" << endl; + SVDEBUG << "ERROR: PluginRDFDescription::indexURL: No valid URI for output " << output << " of plugin <" << m_pluginUri << ">" << endl; return false; } Node n = index->complete(Triple(output, index->expand("vamp:identifier"), Node())); if (n.type != Node::Literal || n.value == "") { - cerr << "ERROR: PluginRDFDescription::indexURL: No vamp:identifier for output <" << output << ">" << endl; + SVDEBUG << "ERROR: PluginRDFDescription::indexURL: No vamp:identifier for output <" << output << ">" << endl; return false; } QString outputId = n.value; @@ -383,7 +384,7 @@ } else { m_outputDispositions[outputId] = OutputDispositionUnknown; } -// cerr << "output " << output << " -> id " << outputId << ", type " << outputType << ", unit " +// SVDEBUG << "output " << output << " -> id " << outputId << ", type " << outputType << ", unit " // << outputUnit << ", disposition " << m_outputDispositions[outputId] << endl; if (outputUnit != "") { @@ -396,7 +397,7 @@ } n = index->complete(Triple(output, index->expand("vamp:computes_event_type"), Node())); -// cerr << output << " -> computes_event_type " << n << endl; +// SVDEBUG << output << " -> computes_event_type " << n << endl; if (n.type == Node::URI && n.value != "") { m_outputEventTypeURIMap[outputId] = n.value; }