It somewhat hampers the use of setup as a command line tool that it writes
everything to stdout. Don't write LOG_BABBLE output to stdout. Add '--verbose'
flag to restore the previous behaviour.
ChangeLog:
2015-03-02 Jon TURNEY <jon.turney@dronecode.org.uk>
* LogFile.cc (VerboseOutput): Add option.
(endEntry): Only write LOG_PLAIN to stdout, unless VerboseOutput.
+2015-03-02 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * LogFile.cc (VerboseOutput): Add option.
+ (endEntry): Only write LOG_PLAIN to stdout, unless VerboseOutput.
+
2015-03-02 Jon TURNEY <jon.turney@dronecode.org.uk>
* res.rc (IDD_FILE_INUSE): Add 'Retry' button. Make larger.
#include "AntiVirus.h"
#include "filemanip.h"
#include "String++.h"
+#include "getopt++/BoolOption.h"
+
+static BoolOption VerboseOutput (false, 'v', "verbose",
+ "Verbose output");
using namespace std;
string buf = theStream->str();
delete theStream;
- cout << buf << endl;
+ /* also write to stdout */
+ if ((currEnt->level >= LOG_PLAIN) || VerboseOutput)
+ cout << buf << endl;
if (!currEnt)
{