use the logger to print warnings
This commit is contained in:
parent
712098a5cd
commit
1c4cdae663
1 changed files with 2 additions and 9 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in a new issue