diff transform/FileFeatureWriter.cpp @ 690:1424aa29ae95

Seems to be a bad idea to use plain DEBUG symbol on OS/X (system wants it)
author Chris Cannam
date Tue, 14 Jun 2011 15:26:52 +0100
parents 06f13a3b9e9e
children f5cd33909744
line wrap: on
line diff
--- a/transform/FileFeatureWriter.cpp	Tue Jun 14 14:47:59 2011 +0100
+++ b/transform/FileFeatureWriter.cpp	Tue Jun 14 15:26:52 2011 +0100
@@ -46,7 +46,7 @@
         } else if (m_support & SupportOneFileTotal) {
             m_singleFileName = QString("output.%1").arg(m_extension);
         } else {
-            DEBUG << "FileFeatureWriter::FileFeatureWriter: ERROR: Invalid support specification " << support << endl;
+            SVDEBUG << "FileFeatureWriter::FileFeatureWriter: ERROR: Invalid support specification " << support << endl;
         }
     }
 }
@@ -60,7 +60,7 @@
     }
     while (!m_files.empty()) {
         if (m_files.begin()->second) {
-            DEBUG << "FileFeatureWriter::~FileFeatureWriter: NOTE: Closing feature file \""
+            SVDEBUG << "FileFeatureWriter::~FileFeatureWriter: NOTE: Closing feature file \""
                  << m_files.begin()->second->fileName() << "\"" << endl;
             delete m_files.begin()->second;
         }
@@ -128,7 +128,7 @@
             if (m_support & SupportOneFilePerTrackTransform &&
                 m_support & SupportOneFilePerTrack) {
                 if (m_singleFileName != "") {
-                    DEBUG << "FileFeatureWriter::setParameters: WARNING: Both one-file and many-files parameters provided, ignoring many-files" << endl;
+                    SVDEBUG << "FileFeatureWriter::setParameters: WARNING: Both one-file and many-files parameters provided, ignoring many-files" << endl;
                 } else {
                     m_manyFiles = true;
                 }
@@ -142,7 +142,7 @@
                     // OneFilePerTrack), so we need to be able to
                     // override it
 //                    if (m_manyFiles) {
-//                        DEBUG << "FileFeatureWriter::setParameters: WARNING: Both many-files and one-file parameters provided, ignoring one-file" << endl;
+//                        SVDEBUG << "FileFeatureWriter::setParameters: WARNING: Both many-files and one-file parameters provided, ignoring one-file" << endl;
 //                    } else {
                         m_singleFileName = i->second.c_str();
 //                    }
@@ -151,7 +151,7 @@
         } else if (i->first == "stdout") {
             if (m_support & SupportOneFileTotal) {
                 if (m_singleFileName != "") {
-                    DEBUG << "FileFeatureWriter::setParameters: WARNING: Both stdout and one-file provided, ignoring stdout" << endl;
+                    SVDEBUG << "FileFeatureWriter::setParameters: WARNING: Both stdout and one-file provided, ignoring stdout" << endl;
                 } else {
                     m_stdout = true;
                 }
@@ -171,7 +171,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;
-            DEBUG << "NOTE: To find out how to fix this problem, read the help for the --" << getWriterTag() << "-force" << endl << "and --" << getWriterTag() << "-append options" << endl;
+            SVDEBUG << "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;
@@ -216,7 +216,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;
-        DEBUG << "NOTE: To find out how to fix this problem, read the help for the --" << getWriterTag() << "-force" << endl << "and --" << getWriterTag() << "-append options" << endl;
+        SVDEBUG << "NOTE: To find out how to fix this problem, read the help for the --" << getWriterTag() << "-force" << endl << "and --" << getWriterTag() << "-append options" << endl;
         return "";
     }
     
@@ -263,11 +263,11 @@
             return 0;
         }
 
-        DEBUG << "FileFeatureWriter: NOTE: Using output filename \""
+        SVDEBUG << "FileFeatureWriter: NOTE: Using output filename \""
              << filename << "\"" << endl;
 
         if (m_append) {
-            DEBUG << "FileFeatureWriter: NOTE: Calling reviewFileForAppending" << endl;
+            SVDEBUG << "FileFeatureWriter: NOTE: Calling reviewFileForAppending" << endl;
             reviewFileForAppending(filename);
         }
         
@@ -329,7 +329,7 @@
 void
 FileFeatureWriter::finish()
 {
-//    DEBUG << "FileFeatureWriter::finish()" << endl;
+//    SVDEBUG << "FileFeatureWriter::finish()" << endl;
 
     if (m_singleFileName != "" || m_stdout) return;
 
@@ -340,7 +340,7 @@
     }
     while (!m_files.empty()) {
         if (m_files.begin()->second) {
-            DEBUG << "FileFeatureWriter::finish: NOTE: Closing feature file \""
+            SVDEBUG << "FileFeatureWriter::finish: NOTE: Closing feature file \""
                  << m_files.begin()->second->fileName() << "\"" << endl;
             delete m_files.begin()->second;
         }