Mercurial > hg > svcore
changeset 1428:87ae75da6527
Convert some cerrs to SVCERRs. Apart from anything else, this makes MSVC2017 happy
author | Chris Cannam |
---|---|
date | Thu, 01 Mar 2018 14:43:40 +0000 |
parents | 622d193a00dc |
children | 48e9f538e6e9 |
files | base/test/TestScaleTickIntervals.h base/test/svcore-base-test.cpp data/fileio/CSVFileReader.cpp data/fileio/WavFileWriter.cpp data/fileio/test/AudioFileReaderTest.h data/fileio/test/AudioFileWriterTest.h data/fileio/test/EncodingTest.h data/fileio/test/MIDIFileReaderTest.h data/fileio/test/svcore-data-fileio-test.cpp data/model/FFTModel.cpp data/model/ReadOnlyWaveFileModel.cpp data/model/WritableWaveFileModel.cpp data/model/test/TestFFTModel.h data/model/test/svcore-data-model-test.cpp plugin/PiperVampPluginFactory.cpp rdf/RDFFeatureWriter.cpp transform/CSVFeatureWriter.cpp transform/FileFeatureWriter.cpp |
diffstat | 18 files changed, 85 insertions(+), 82 deletions(-) [+] |
line wrap: on
line diff
--- a/base/test/TestScaleTickIntervals.h Mon Dec 11 09:28:40 2017 +0000 +++ b/base/test/TestScaleTickIntervals.h Thu Mar 01 14:43:40 2018 +0000 @@ -32,16 +32,16 @@ void printDiff(vector<ScaleTickIntervals::Tick> ticks, vector<ScaleTickIntervals::Tick> expected) { - cerr << "Have " << ticks.size() << " ticks, expected " + SVCERR << "Have " << ticks.size() << " ticks, expected " << expected.size() << endl; for (int i = 0; i < int(ticks.size()); ++i) { - cerr << i << ": have " << ticks[i].value << " \"" + SVCERR << i << ": have " << ticks[i].value << " \"" << ticks[i].label << "\", expected "; if (i < int(expected.size())) { - cerr << expected[i].value << " \"" << expected[i].label + SVCERR << expected[i].value << " \"" << expected[i].label << "\"" << endl; } else { - cerr << "(n/a)" << endl; + SVCERR << "(n/a)" << endl; } } }
--- a/base/test/svcore-base-test.cpp Mon Dec 11 09:28:40 2017 +0000 +++ b/base/test/svcore-base-test.cpp Thu Mar 01 14:43:40 2018 +0000 @@ -74,10 +74,10 @@ } if (bad > 0) { - cerr << "\n********* " << bad << " test suite(s) failed!\n" << endl; - return 1; + SVCERR << "\n********* " << bad << " test suite(s) failed!\n" << endl; + return 1; } else { - cerr << "All tests passed" << endl; - return 0; + SVCERR << "All tests passed" << endl; + return 0; } }
--- a/data/fileio/CSVFileReader.cpp Mon Dec 11 09:28:40 2017 +0000 +++ b/data/fileio/CSVFileReader.cpp Thu Mar 01 14:43:40 2018 +0000 @@ -34,6 +34,7 @@ #include <iostream> #include <map> +#include <string> using namespace std; @@ -137,12 +138,12 @@ if (!ok) { if (m_warnings < warnLimit) { - cerr << "WARNING: CSVFileReader::load: " + SVCERR << "WARNING: CSVFileReader::load: " << "Bad time format (\"" << s << "\") in data line " << lineno+1 << endl; } else if (m_warnings == warnLimit) { - cerr << "WARNING: Too many warnings" << endl; + SVCERR << "WARNING: Too many warnings" << endl; } ++m_warnings; } @@ -384,15 +385,15 @@ if (!ok) { if (warnings < warnLimit) { - cerr << "WARNING: CSVFileReader::load: " + SVCERR << "WARNING: CSVFileReader::load: " << "Non-numeric value \"" << list[i] << "\" in data line " << lineno+1 << ":" << endl; - cerr << line << endl; + SVCERR << line << endl; ++warnings; } else if (warnings == warnLimit) { -// cerr << "WARNING: Too many warnings" << endl; +// SVCERR << "WARNING: Too many warnings" << endl; } } } @@ -426,11 +427,11 @@ for (map<int, map<QString, float> >::iterator i = countLabelValueMap.end(); i != countLabelValueMap.begin(); ) { --i; - cerr << "count -> " << i->first << endl; + SVCERR << "count -> " << i->first << endl; for (map<QString, float>::iterator j = i->second.begin(); j != i->second.end(); ++j) { j->second = v; - cerr << "label -> " << j->first << ", value " << v << endl; + SVCERR << "label -> " << j->first << ", value " << v << endl; v = v + 1.f; } } @@ -443,7 +444,7 @@ RegionModel::Point p(*i); int count = labelCountMap[p.label]; v = countLabelValueMap[count][p.label]; - cerr << "mapping from label \"" << p.label << "\" (count " << count << ") to value " << v << endl; + // SVCERR << "mapping from label \"" << p.label << "\" (count " << count << ") to value " << v << endl; RegionModel::Point pp(p.frame, v, p.duration, p.label); pointMap[p] = pp; }
--- a/data/fileio/WavFileWriter.cpp Mon Dec 11 09:28:40 2017 +0000 +++ b/data/fileio/WavFileWriter.cpp Thu Mar 01 14:43:40 2018 +0000 @@ -19,11 +19,13 @@ #include "base/Selection.h" #include "base/TempWriteFile.h" #include "base/Exceptions.h" +#include "base/Debug.h" #include <QFileInfo> #include <iostream> #include <cmath> +#include <string> using namespace std; @@ -41,7 +43,7 @@ int fileRate = int(round(m_sampleRate)); if (m_sampleRate != sv_samplerate_t(fileRate)) { - cerr << "WavFileWriter: WARNING: Non-integer sample rate " + SVCERR << "WavFileWriter: WARNING: Non-integer sample rate " << m_sampleRate << " presented, rounding to " << fileRate << endl; } @@ -61,7 +63,7 @@ m_file = sf_open(writePath.toLocal8Bit(), SFM_WRITE, &fileInfo); #endif if (!m_file) { - cerr << "WavFileWriter: Failed to open file (" + SVCERR << "WavFileWriter: Failed to open file (" << sf_strerror(m_file) << ")" << endl; m_error = QString("Failed to open audio file '%1' for writing") .arg(writePath);
--- a/data/fileio/test/AudioFileReaderTest.h Mon Dec 11 09:28:40 2017 +0000 +++ b/data/fileio/test/AudioFileReaderTest.h Thu Mar 01 14:43:40 2018 +0000 @@ -188,11 +188,11 @@ { if (!QDir(audioDir).exists()) { QString cwd = QDir::currentPath(); - cerr << "ERROR: Audio test file directory \"" << audioDir << "\" does not exist (cwd = " << cwd << ")" << endl; + SVCERR << "ERROR: Audio test file directory \"" << audioDir << "\" does not exist (cwd = " << cwd << ")" << endl; QVERIFY2(QDir(audioDir).exists(), "Audio test file directory not found"); } if (!QDir(diffDir).exists() && !QDir().mkpath(diffDir)) { - cerr << "ERROR: Audio diff directory \"" << diffDir << "\" does not exist and could not be created" << endl; + SVCERR << "ERROR: Audio diff directory \"" << diffDir << "\" does not exist and could not be created" << endl; QVERIFY2(QDir(diffDir).exists(), "Audio diff directory not found and could not be created"); } } @@ -426,7 +426,7 @@ for (int i = 0; i < refFrames; ++i) { int ix = i + offset; if (ix >= read) { - cerr << "ERROR: audiofile " << audiofile << " reads truncated (read-rate reference frames " << i << " onward, of " << refFrames << ", are lost)" << endl; + SVCERR << "ERROR: audiofile " << audiofile << " reads truncated (read-rate reference frames " << i << " onward, of " << refFrames << ", are lost)" << endl; QVERIFY(ix < read); } @@ -465,11 +465,11 @@ cerr << "channel " << c << ": max diff " << maxDiff << " at " << maxIndex << endl; */ if (rmsDiff >= rmsLimit) { - cerr << "ERROR: for audiofile " << audiofile << ": RMS diff = " << rmsDiff << " for channel " << c << " (limit = " << rmsLimit << ")" << endl; + SVCERR << "ERROR: for audiofile " << audiofile << ": RMS diff = " << rmsDiff << " for channel " << c << " (limit = " << rmsLimit << ")" << endl; QVERIFY(rmsDiff < rmsLimit); } if (maxDiff >= maxLimit) { - cerr << "ERROR: for audiofile " << audiofile << ": max diff = " << maxDiff << " at frame " << maxIndex << " of " << read << " on channel " << c << " (limit = " << maxLimit << ", edge limit = " << edgeLimit << ", mean diff = " << meanDiff << ", rms = " << rmsDiff << ")" << endl; + SVCERR << "ERROR: for audiofile " << audiofile << ": max diff = " << maxDiff << " at frame " << maxIndex << " of " << read << " on channel " << c << " (limit = " << maxLimit << ", edge limit = " << edgeLimit << ", mean diff = " << meanDiff << ", rms = " << rmsDiff << ")" << endl; QVERIFY(maxDiff < maxLimit); } @@ -480,7 +480,7 @@ float quiet = 0.1f; //!!! allow some ringing - but let's come back to this, it should tail off float mag = fabsf(test[ix * channels + c]); if (mag > quiet) { - cerr << "ERROR: audiofile " << audiofile << " contains spurious data after end of reference (found sample " << test[ix * channels + c] << " at index " << ix << " of channel " << c << " after reference+offset ended at " << refFrames+offset << ")" << endl; + SVCERR << "ERROR: audiofile " << audiofile << " contains spurious data after end of reference (found sample " << test[ix * channels + c] << " at index " << ix << " of channel " << c << " after reference+offset ended at " << refFrames+offset << ")" << endl; QVERIFY(mag < quiet); } }
--- a/data/fileio/test/AudioFileWriterTest.h Mon Dec 11 09:28:40 2017 +0000 +++ b/data/fileio/test/AudioFileWriterTest.h Thu Mar 01 14:43:40 2018 +0000 @@ -69,7 +69,7 @@ void init() { if (!QDir(outDir).exists() && !QDir().mkpath(outDir)) { - cerr << "ERROR: Audio out directory \"" << outDir << "\" does not exist and could not be created" << endl; + SVCERR << "ERROR: Audio out directory \"" << outDir << "\" does not exist and could not be created" << endl; QVERIFY2(QDir(outDir).exists(), "Audio out directory not found and could not be created"); } }
--- a/data/fileio/test/EncodingTest.h Mon Dec 11 09:28:40 2017 +0000 +++ b/data/fileio/test/EncodingTest.h Thu Mar 01 14:43:40 2018 +0000 @@ -82,11 +82,11 @@ void init() { if (!QDir(encodingDir).exists()) { - cerr << "ERROR: Audio encoding file directory \"" << encodingDir << "\" does not exist" << endl; + SVCERR << "ERROR: Audio encoding file directory \"" << encodingDir << "\" does not exist" << endl; QVERIFY2(QDir(encodingDir).exists(), "Audio encoding file directory not found"); } if (!QDir(outDir).exists() && !QDir().mkpath(outDir)) { - cerr << "ERROR: Audio out directory \"" << outDir << "\" does not exist and could not be created" << endl; + SVCERR << "ERROR: Audio out directory \"" << outDir << "\" does not exist and could not be created" << endl; QVERIFY2(QDir(outDir).exists(), "Audio out directory not found and could not be created"); } } @@ -161,17 +161,17 @@ found = true; QString expected = QString::fromUtf8(mapping[m][1]); if (title != expected) { - cerr << "Title does not match expected: codepoints are" << endl; - cerr << "Title (" << title.length() << "ch): "; + SVCERR << "Title does not match expected: codepoints are" << endl; + SVCERR << "Title (" << title.length() << "ch): "; for (int i = 0; i < title.length(); ++i) { - cerr << title[i].unicode() << " "; + SVCERR << title[i].unicode() << " "; } - cerr << endl; - cerr << "Expected (" << expected.length() << "ch): "; + SVCERR << endl; + SVCERR << "Expected (" << expected.length() << "ch): "; for (int i = 0; i < expected.length(); ++i) { - cerr << expected[i].unicode() << " "; + SVCERR << expected[i].unicode() << " "; } - cerr << endl; + SVCERR << endl; } QCOMPARE(title, expected); break; @@ -185,7 +185,7 @@ // the expected UTF-16. We check this properly in // readWriteAudio below, by saving out the file to a // name matching the metadata - cerr << "Couldn't find filename \"" + SVCERR << "Couldn't find filename \"" << file << "\" in title mapping array" << endl; QSKIP("Couldn't find filename in title mapping array"); }
--- a/data/fileio/test/MIDIFileReaderTest.h Mon Dec 11 09:28:40 2017 +0000 +++ b/data/fileio/test/MIDIFileReaderTest.h Thu Mar 01 14:43:40 2018 +0000 @@ -55,7 +55,7 @@ void init() { if (!QDir(midiDir).exists()) { - cerr << "ERROR: MIDI file directory \"" << midiDir << "\" does not exist" << endl; + SVCERR << "ERROR: MIDI file directory \"" << midiDir << "\" does not exist" << endl; QVERIFY2(QDir(midiDir).exists(), "MIDI file directory not found"); } } @@ -76,7 +76,7 @@ MIDIFileReader reader(path, nullptr, 44100); Model *m = reader.load(); if (!m) { - cerr << "MIDI load failed for path: \"" << path << "\"" << endl; + SVCERR << "MIDI load failed for path: \"" << path << "\"" << endl; } QVERIFY(m != nullptr); //!!! Ah, now here we could do something a bit more informative
--- a/data/fileio/test/svcore-data-fileio-test.cpp Mon Dec 11 09:28:40 2017 +0000 +++ b/data/fileio/test/svcore-data-fileio-test.cpp Thu Mar 01 14:43:40 2018 +0000 @@ -34,12 +34,12 @@ #endif if (argc > 1) { - cerr << "argc = " << argc << endl; + SVCERR << "argc = " << argc << endl; testDir = argv[1]; } if (testDir != "") { - cerr << "Setting test directory base path to \"" << testDir << "\"" << endl; + SVCERR << "Setting test directory base path to \"" << testDir << "\"" << endl; } QCoreApplication app(argc, argv); @@ -71,10 +71,10 @@ } if (bad > 0) { - cerr << "\n********* " << bad << " test suite(s) failed!\n" << endl; + SVCERR << "\n********* " << bad << " test suite(s) failed!\n" << endl; return 1; } else { - cerr << "All tests passed" << endl; + SVCERR << "All tests passed" << endl; return 0; } }
--- a/data/model/FFTModel.cpp Mon Dec 11 09:28:40 2017 +0000 +++ b/data/model/FFTModel.cpp Thu Mar 01 14:43:40 2018 +0000 @@ -19,6 +19,7 @@ #include "base/Profiler.h" #include "base/Pitch.h" #include "base/HitCount.h" +#include "base/Debug.h" #include <algorithm> @@ -52,8 +53,8 @@ } if (m_windowSize > m_fftSize) { - cerr << "ERROR: FFTModel::FFTModel: window size (" << m_windowSize - << ") must be at least FFT size (" << m_fftSize << ")" << endl; + SVCERR << "ERROR: FFTModel::FFTModel: window size (" << m_windowSize + << ") must be at least FFT size (" << m_fftSize << ")" << endl; throw invalid_argument("FFTModel window size must be at least FFT size"); } @@ -72,7 +73,7 @@ FFTModel::sourceModelAboutToBeDeleted() { if (m_model) { - cerr << "FFTModel[" << this << "]::sourceModelAboutToBeDeleted(" << m_model << ")" << endl; + SVDEBUG << "FFTModel[" << this << "]::sourceModelAboutToBeDeleted(" << m_model << ")" << endl; m_model = 0; } }
--- a/data/model/ReadOnlyWaveFileModel.cpp Mon Dec 11 09:28:40 2017 +0000 +++ b/data/model/ReadOnlyWaveFileModel.cpp Thu Mar 01 14:43:40 2018 +0000 @@ -219,7 +219,7 @@ int channels = getChannelCount(); if (channel >= channels) { - cerr << "ERROR: WaveFileModel::getData: channel (" + SVCERR << "ERROR: WaveFileModel::getData: channel (" << channel << ") >= channel count (" << channels << ")" << endl; return {}; @@ -278,14 +278,14 @@ int channels = getChannelCount(); if (fromchannel > tochannel) { - cerr << "ERROR: ReadOnlyWaveFileModel::getData: fromchannel (" + SVCERR << "ERROR: ReadOnlyWaveFileModel::getData: fromchannel (" << fromchannel << ") > tochannel (" << tochannel << ")" << endl; return {}; } if (tochannel >= channels) { - cerr << "ERROR: ReadOnlyWaveFileModel::getData: tochannel (" + SVCERR << "ERROR: ReadOnlyWaveFileModel::getData: tochannel (" << tochannel << ") >= channel count (" << channels << ")" << endl; return {};
--- a/data/model/WritableWaveFileModel.cpp Mon Dec 11 09:28:40 2017 +0000 +++ b/data/model/WritableWaveFileModel.cpp Thu Mar 01 14:43:40 2018 +0000 @@ -54,7 +54,7 @@ path = dir.filePath(QString("written_%1.wav") .arg((intptr_t)this)); } catch (DirectoryCreationFailed f) { - cerr << "WritableWaveFileModel: Failed to create temporary directory" << endl; + SVCERR << "WritableWaveFileModel: Failed to create temporary directory" << endl; return; } } @@ -64,7 +64,7 @@ m_writer = new WavFileWriter(path, sampleRate, channels, WavFileWriter::WriteToTarget); if (!m_writer->isOK()) { - cerr << "WritableWaveFileModel: Error in creating WAV file writer: " << m_writer->getError() << endl; + SVCERR << "WritableWaveFileModel: Error in creating WAV file writer: " << m_writer->getError() << endl; delete m_writer; m_writer = 0; return; @@ -74,7 +74,7 @@ m_reader = new WavFileReader(source, true); if (!m_reader->getError().isEmpty()) { - cerr << "WritableWaveFileModel: Error in creating wave file reader" << endl; + SVCERR << "WritableWaveFileModel: Error in creating wave file reader" << endl; delete m_reader; m_reader = 0; return; @@ -82,7 +82,7 @@ m_model = new ReadOnlyWaveFileModel(source, m_reader); if (!m_model->isOK()) { - cerr << "WritableWaveFileModel: Error in creating wave file model" << endl; + SVCERR << "WritableWaveFileModel: Error in creating wave file model" << endl; delete m_model; m_model = 0; delete m_reader;
--- a/data/model/test/TestFFTModel.h Mon Dec 11 09:28:40 2017 +0000 +++ b/data/model/test/TestFFTModel.h Thu Mar 01 14:43:40 2018 +0000 @@ -66,18 +66,18 @@ float thresh = 1e-5f; if (abs(reals[i] - eRe) > thresh || abs(imags[i] - eIm) > thresh) { - cerr << "ERROR: output is not as expected for column " + SVCERR << "ERROR: output is not as expected for column " << i << " in channel " << ch << " (stepThrough = " << stepThrough << ")" << endl; - cerr << "expected : "; + SVCERR << "expected : "; for (int j = 0; j < hs1; ++j) { - cerr << expectedValues[ch][j] << " "; + SVCERR << expectedValues[ch][j] << " "; } - cerr << "\nactual : "; + SVCERR << "\nactual : "; for (int j = 0; j < hs1; ++j) { - cerr << complex<float>(reals[j], imags[j]) << " "; + SVCERR << complex<float>(reals[j], imags[j]) << " "; } - cerr << endl; + SVCERR << endl; } COMPARE_FUZZIER_F(reals[i], eRe); COMPARE_FUZZIER_F(imags[i], eIm);
--- a/data/model/test/svcore-data-model-test.cpp Mon Dec 11 09:28:40 2017 +0000 +++ b/data/model/test/svcore-data-model-test.cpp Thu Mar 01 14:43:40 2018 +0000 @@ -34,10 +34,10 @@ } if (bad > 0) { - cerr << "\n********* " << bad << " test suite(s) failed!\n" << endl; + SVCERR << "\n********* " << bad << " test suite(s) failed!\n" << endl; return 1; } else { - cerr << "All tests passed" << endl; + SVCERR << "All tests passed" << endl; return 0; } }
--- a/plugin/PiperVampPluginFactory.cpp Mon Dec 11 09:28:40 2017 +0000 +++ b/plugin/PiperVampPluginFactory.cpp Thu Mar 01 14:43:40 2018 +0000 @@ -113,8 +113,7 @@ Profiler profiler("PiperVampPluginFactory::instantiatePlugin"); if (m_origins.find(identifier) == m_origins.end()) { - cerr << "ERROR: No known server for identifier " << identifier << endl; - SVDEBUG << "ERROR: No known server for identifier " << identifier << endl; + SVCERR << "ERROR: No known server for identifier " << identifier << endl; return 0; }
--- a/rdf/RDFFeatureWriter.cpp Mon Dec 11 09:28:40 2017 +0000 +++ b/rdf/RDFFeatureWriter.cpp Thu Mar 01 14:43:40 2018 +0000 @@ -146,14 +146,14 @@ m_rdfDescriptions[pluginId] = PluginRDFDescription(pluginId); if (m_rdfDescriptions[pluginId].haveDescription()) { - cerr << "NOTE: Have RDF description for plugin ID \"" + SVCERR << "NOTE: Have RDF description for plugin ID \"" << pluginId << "\"" << endl; } else { - cerr << "NOTE: No RDF description for plugin ID \"" + SVCERR << "NOTE: No RDF description for plugin ID \"" << pluginId << "\"" << endl; if (!m_network) { - cerr << " Consider using the --rdf-network option to retrieve plugin descriptions" << endl; - cerr << " from the network where possible." << endl; + SVCERR << " Consider using the --rdf-network option to retrieve plugin descriptions" << endl; + SVCERR << " from the network where possible." << endl; } } } @@ -194,7 +194,7 @@ QString timelineURI = m_trackTimelineURIs[trackId]; if (timelineURI == "") { - cerr << "RDFFeatureWriter: INTERNAL ERROR: writing features without having established a timeline URI!" << endl; + SVCERR << "RDFFeatureWriter: INTERNAL ERROR: writing features without having established a timeline URI!" << endl; exit(1); } @@ -211,7 +211,7 @@ QString signalURI = m_trackSignalURIs[trackId]; if (signalURI == "") { - cerr << "RDFFeatureWriter: INTERNAL ERROR: writing dense features without having established a signal URI!" << endl; + SVCERR << "RDFFeatureWriter: INTERNAL ERROR: writing dense features without having established a signal URI!" << endl; exit(1); } @@ -229,7 +229,7 @@ QString signalURI = m_trackSignalURIs[trackId]; if (signalURI == "") { - cerr << "RDFFeatureWriter: INTERNAL ERROR: writing track-level features without having established a signal URI!" << endl; + SVCERR << "RDFFeatureWriter: INTERNAL ERROR: writing track-level features without having established a signal URI!" << endl; exit(1); } @@ -702,19 +702,19 @@ sampleRate = transform.getSampleRate(); if (sampleRate == 0.f) { - cerr << "RDFFeatureWriter: INTERNAL ERROR: writing dense features without having set the sample rate properly!" << endl; + SVCERR << "RDFFeatureWriter: INTERNAL ERROR: writing dense features without having set the sample rate properly!" << endl; return; } stepSize = transform.getStepSize(); if (stepSize == 0) { - cerr << "RDFFeatureWriter: INTERNAL ERROR: writing dense features without having set the step size properly!" << endl; + SVCERR << "RDFFeatureWriter: INTERNAL ERROR: writing dense features without having set the step size properly!" << endl; return; } blockSize = transform.getBlockSize(); if (blockSize == 0) { - cerr << "RDFFeatureWriter: INTERNAL ERROR: writing dense features without having set the block size properly!" << endl; + SVCERR << "RDFFeatureWriter: INTERNAL ERROR: writing dense features without having set the block size properly!" << endl; return; } }
--- a/transform/CSVFeatureWriter.cpp Mon Dec 11 09:28:40 2017 +0000 +++ b/transform/CSVFeatureWriter.cpp Thu Mar 01 14:43:40 2018 +0000 @@ -117,8 +117,8 @@ } else if (i->first == "digits") { int digits = atoi(i->second.c_str()); if (digits <= 0 || digits > 100) { - cerr << "CSVFeatureWriter: ERROR: Invalid or out-of-range value for number of significant digits: " << i->second << endl; - cerr << "CSVFeatureWriter: NOTE: Continuing with default settings" << endl; + SVCERR << "CSVFeatureWriter: ERROR: Invalid or out-of-range value for number of significant digits: " << i->second << endl; + SVCERR << "CSVFeatureWriter: NOTE: Continuing with default settings" << endl; } else { m_digits = digits; }
--- a/transform/FileFeatureWriter.cpp Mon Dec 11 09:28:40 2017 +0000 +++ b/transform/FileFeatureWriter.cpp Thu Mar 01 14:43:40 2018 +0000 @@ -46,7 +46,7 @@ } else if (m_support & SupportOneFileTotal) { m_singleFileName = QString("output.%1").arg(m_extension); } else { - cerr << "FileFeatureWriter::FileFeatureWriter: ERROR: Invalid support specification " << support << endl; + SVCERR << "FileFeatureWriter::FileFeatureWriter: ERROR: Invalid support specification " << support << endl; } } } @@ -130,7 +130,7 @@ if (m_support & SupportOneFilePerTrackTransform && m_support & SupportOneFilePerTrack) { if (m_singleFileName != "") { - cerr << "FileFeatureWriter::setParameters: WARNING: Both one-file and many-files parameters provided, ignoring many-files" << endl; + SVCERR << "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) { -// cerr << "FileFeatureWriter::setParameters: WARNING: Both many-files and one-file parameters provided, ignoring one-file" << endl; +// SVCERR << "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 != "") { - cerr << "FileFeatureWriter::setParameters: WARNING: Both stdout and one-file provided, ignoring stdout" << endl; + SVCERR << "FileFeatureWriter::setParameters: WARNING: Both stdout and one-file provided, ignoring stdout" << endl; } else { m_stdout = true; } @@ -172,8 +172,8 @@ { 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; - cerr << "NOTE: To find out how to fix this problem, read the help for the --" << getWriterTag() << "-force" << endl << "and --" << getWriterTag() << "-append options" << endl; + SVCERR << endl << "FileFeatureWriter: ERROR: Specified output file \"" << m_singleFileName << "\" exists and neither --" << getWriterTag() << "-force nor --" << getWriterTag() << "-append flag is specified -- not overwriting" << endl; + SVCERR << "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; @@ -219,8 +219,8 @@ filename = QDir(dirname).filePath(filename); 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; - cerr << "NOTE: To find out how to fix this problem, read the help for the --" << getWriterTag() << "-force" << endl << "and --" << getWriterTag() << "-append options" << endl; + SVCERR << 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; + SVCERR << "NOTE: To find out how to fix this problem, read the help for the --" << getWriterTag() << "-force" << endl << "and --" << getWriterTag() << "-append options" << endl; return ""; } @@ -300,7 +300,7 @@ if (m_append) mode |= QIODevice::Append; if (!file->open(mode)) { - cerr << "FileFeatureWriter: ERROR: Failed to open output file \"" << filename + SVCERR << "FileFeatureWriter: ERROR: Failed to open output file \"" << filename << "\" for writing" << endl; delete file; m_files[key] = 0;