changeset 1140:c7f1300dbf64

Debug outputs
author Chris Cannam
date Tue, 03 Nov 2015 11:34:44 +0000 (2015-11-03)
parents 205250c5d2a2
children 99acfd2d9f5d
files plugin/FeatureExtractionPluginFactory.cpp transform/FileFeatureWriter.cpp
diffstat 2 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/plugin/FeatureExtractionPluginFactory.cpp	Tue Nov 03 11:34:23 2015 +0000
+++ b/plugin/FeatureExtractionPluginFactory.cpp	Tue Nov 03 11:34:44 2015 +0000
@@ -119,7 +119,7 @@
     for (std::vector<QString>::iterator i = path.begin(); i != path.end(); ++i) {
 
 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
-        SVDEBUG << "FeatureExtractionPluginFactory::getPluginIdentifiers: scanning directory " << i-<< endl;
+        cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: scanning directory " << *i << endl;
 #endif
 
 	QDir pluginDir(*i, PLUGIN_GLOB,
@@ -131,7 +131,7 @@
             QString soname = pluginDir.filePath(pluginDir[j]);
 
 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
-            SVDEBUG << "FeatureExtractionPluginFactory::getPluginIdentifiers: trying potential library " << soname << endl;
+            cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: trying potential library " << soname << endl;
 #endif
 
             void *libraryHandle = DLOPEN(soname, RTLD_LAZY | RTLD_LOCAL);
@@ -142,7 +142,7 @@
             }
 
 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
-            SVDEBUG << "FeatureExtractionPluginFactory::getPluginIdentifiers: It's a library all right, checking for descriptor" << endl;
+            cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: It's a library all right, checking for descriptor" << endl;
 #endif
 
             VampGetPluginDescriptorFunction fn = (VampGetPluginDescriptorFunction)
@@ -157,7 +157,7 @@
             }
 
 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
-            SVDEBUG << "FeatureExtractionPluginFactory::getPluginIdentifiers: Vamp descriptor found" << endl;
+            cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: Vamp descriptor found" << endl;
 #endif
 
             const VampPluginDescriptor *descriptor = 0;
@@ -175,7 +175,7 @@
                               << descriptor->identifier << "\" at indices "
                               << known[descriptor->identifier] << " and "
                               << index << endl;
-                    SVDEBUG << "FeatureExtractionPluginFactory::getPluginIdentifiers: Avoiding this library (obsolete API?)" << endl;
+                    cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: Avoiding this library (obsolete API?)" << endl;
                     ok = false;
                     break;
                 } else {
@@ -195,7 +195,7 @@
                         ("vamp", soname, descriptor->identifier);
                     rv.push_back(id);
 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
-                    SVDEBUG << "FeatureExtractionPluginFactory::getPluginIdentifiers: Found plugin id " << id << " at index " << index << endl;
+                    cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: Found plugin id " << id << " at index " << index << endl;
 #endif
                     ++index;
                 }
@@ -218,7 +218,7 @@
     QString file = "";
 
 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
-    SVDEBUG << "FeatureExtractionPluginFactory::findPluginFile(\""
+    cerr << "FeatureExtractionPluginFactory::findPluginFile(\""
               << soname << "\", \"" << inDir << "\")"
               << endl;
 #endif
@@ -235,7 +235,7 @@
         if (QFileInfo(file).exists() && QFileInfo(file).isFile()) {
 
 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
-            SVDEBUG << "FeatureExtractionPluginFactory::findPluginFile: "
+            cerr << "FeatureExtractionPluginFactory::findPluginFile: "
                       << "found trivially at " << file << endl;
 #endif
 
@@ -247,7 +247,7 @@
             if (QFileInfo(file).baseName() == QFileInfo(soname).baseName()) {
 
 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
-                SVDEBUG << "FeatureExtractionPluginFactory::findPluginFile: "
+                cerr << "FeatureExtractionPluginFactory::findPluginFile: "
                           << "found \"" << soname << "\" at " << file << endl;
 #endif
 
@@ -256,7 +256,7 @@
         }
 
 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
-        SVDEBUG << "FeatureExtractionPluginFactory::findPluginFile (with dir): "
+        cerr << "FeatureExtractionPluginFactory::findPluginFile (with dir): "
                   << "not found" << endl;
 #endif
 
@@ -268,7 +268,7 @@
 
         if (fi.isAbsolute() && fi.exists() && fi.isFile()) {
 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
-            SVDEBUG << "FeatureExtractionPluginFactory::findPluginFile: "
+            cerr << "FeatureExtractionPluginFactory::findPluginFile: "
                       << "found trivially at " << soname << endl;
 #endif
             return soname;
@@ -289,7 +289,7 @@
         }
 
 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
-        SVDEBUG << "FeatureExtractionPluginFactory::findPluginFile: "
+        cerr << "FeatureExtractionPluginFactory::findPluginFile: "
                   << "not found" << endl;
 #endif
 
@@ -312,7 +312,7 @@
     QString type, soname, label;
     PluginIdentifier::parseIdentifier(identifier, type, soname, label);
     if (type != "vamp") {
-	SVDEBUG << "FeatureExtractionPluginFactory::instantiatePlugin: Wrong factory for plugin type " << type << endl;
+	cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Wrong factory for plugin type " << type << endl;
 	return 0;
     }
 
@@ -324,7 +324,7 @@
     } else if (found != soname) {
 
 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
-        SVDEBUG << "FeatureExtractionPluginFactory::instantiatePlugin: Given library name was " << soname << ", found at " << found << endl;
+        cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Given library name was " << soname << ", found at " << found << endl;
         cerr << soname << " -> " << found << endl;
 #endif
 
@@ -343,7 +343,7 @@
         DLSYM(libraryHandle, "vampGetPluginDescriptor");
     
     if (!fn) {
-        SVDEBUG << "FeatureExtractionPluginFactory::instantiatePlugin: No descriptor function in " << soname << endl;
+        cerr << "FeatureExtractionPluginFactory::instantiatePlugin: No descriptor function in " << soname << endl;
         goto done;
     }
 
--- a/transform/FileFeatureWriter.cpp	Tue Nov 03 11:34:23 2015 +0000
+++ b/transform/FileFeatureWriter.cpp	Tue Nov 03 11:34:44 2015 +0000
@@ -46,7 +46,7 @@
         } else if (m_support & SupportOneFileTotal) {
             m_singleFileName = QString("output.%1").arg(m_extension);
         } else {
-            SVDEBUG << "FileFeatureWriter::FileFeatureWriter: ERROR: Invalid support specification " << support << endl;
+            cerr << "FileFeatureWriter::FileFeatureWriter: ERROR: Invalid support specification " << support << endl;
         }
     }
 }
@@ -130,7 +130,7 @@
             if (m_support & SupportOneFilePerTrackTransform &&
                 m_support & SupportOneFilePerTrack) {
                 if (m_singleFileName != "") {
-                    SVDEBUG << "FileFeatureWriter::setParameters: WARNING: Both one-file and many-files parameters provided, ignoring many-files" << endl;
+                    cerr << "FileFeatureWriter::setParameters: WARNING: Both one-file and many-files parameters provided, ignoring many-files" << endl;
                 } else {
                     m_manyFiles = true;
                 }
@@ -144,7 +144,7 @@
                     // OneFilePerTrack), so we need to be able to
                     // override it
 //                    if (m_manyFiles) {
-//                        SVDEBUG << "FileFeatureWriter::setParameters: WARNING: Both many-files and one-file parameters provided, ignoring one-file" << endl;
+//                        cerr << "FileFeatureWriter::setParameters: WARNING: Both many-files and one-file parameters provided, ignoring one-file" << endl;
 //                    } else {
                         m_singleFileName = i->second.c_str();
 //                    }
@@ -153,7 +153,7 @@
         } else if (i->first == "stdout") {
             if (m_support & SupportStdOut) {
                 if (m_singleFileName != "") {
-                    SVDEBUG << "FileFeatureWriter::setParameters: WARNING: Both stdout and one-file provided, ignoring stdout" << endl;
+                    cerr << "FileFeatureWriter::setParameters: WARNING: Both stdout and one-file provided, ignoring stdout" << endl;
                 } else {
                     m_stdout = true;
                 }
@@ -173,7 +173,7 @@
     if (m_singleFileName != "") {
         if (QFileInfo(m_singleFileName).exists() && !(m_force || m_append)) {
             cerr << endl << "FileFeatureWriter: ERROR: Specified output file \"" << m_singleFileName << "\" exists and neither --" << getWriterTag() << "-force nor --" << getWriterTag() << "-append flag is specified -- not overwriting" << endl;
-            SVDEBUG << "NOTE: To find out how to fix this problem, read the help for the --" << getWriterTag() << "-force" << endl << "and --" << getWriterTag() << "-append options" << endl;
+            cerr << "NOTE: To find out how to fix this problem, read the help for the --" << getWriterTag() << "-force" << endl << "and --" << getWriterTag() << "-append options" << endl;
             return "";
         }
         return m_singleFileName;
@@ -220,7 +220,7 @@
 
     if (QFileInfo(filename).exists() && !(m_force || m_append)) {
         cerr << endl << "FileFeatureWriter: ERROR: Output file \"" << filename << "\" exists (for input file or URL \"" << trackId << "\" and transform \"" << transformId << "\") and neither --" << getWriterTag() << "-force nor --" << getWriterTag() << "-append is specified -- not overwriting" << endl;
-        SVDEBUG << "NOTE: To find out how to fix this problem, read the help for the --" << getWriterTag() << "-force" << endl << "and --" << getWriterTag() << "-append options" << endl;
+        cerr << "NOTE: To find out how to fix this problem, read the help for the --" << getWriterTag() << "-force" << endl << "and --" << getWriterTag() << "-append options" << endl;
         return "";
     }