use the logger to print warnings

This commit is contained in:
nojhan 2011-10-02 15:44:51 +02:00
commit 1c4cdae663

View file

@ -35,16 +35,11 @@
#include <cctype> #include <cctype>
#include <utils/compatibility.h> #include <utils/compatibility.h>
#include <utils/eoParser.h> #include <utils/eoParser.h>
#include <utils/eoLogger.h>
using namespace std; using namespace std;
void eoWarning(std::string str)
{
cout << str << '\n';
}
std::ostream& printSectionHeader(std::ostream& os, std::string section) std::ostream& printSectionHeader(std::ostream& os, std::string section)
{ {
if (section == "") if (section == "")
@ -117,7 +112,6 @@ eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription,
} }
eoParam * eoParser::getParamWithLongName(const std::string& _name) const eoParam * eoParser::getParamWithLongName(const std::string& _name) const
{ {
typedef std::multimap<std::string, eoParam*> MultiMapType; typedef std::multimap<std::string, eoParam*> MultiMapType;
@ -130,7 +124,6 @@ eoParam * eoParser::getParamWithLongName(const std::string& _name) const
} }
void eoParser::processParam(eoParam& param, std::string section) void eoParser::processParam(eoParam& param, std::string section)
{ {
// this param enters the parser: add the prefix to the long name // this param enters the parser: add the prefix to the long name
@ -214,7 +207,7 @@ void eoParser::readFrom(istream& is)
{ {
if (str.size() < 2) if (str.size() < 2)
{ {
eoWarning("Missing parameter"); eo::log << eo::warnings << "Missing parameter" << std::endl;
needHelp.value() = true; needHelp.value() = true;
return; return;
} }