migrate logging for effects and verbose options (#38)

* start step by step  migration to new logger

* fix linking for serialport

* migrate effectengine to new logger

* tune log messages

* add commandline options for hyperiond to control verbosity
--silent
--verbose
--debug
This commit is contained in:
redPanther
2016-06-23 13:48:49 +02:00
committed by brindosch
parent 34252b434d
commit d4142b4eb4
6 changed files with 54 additions and 19 deletions

View File

@@ -10,6 +10,7 @@
// effect engin eincludes
#include "Effect.h"
#include <utils/Logger.h>
// Python method table
PyMethodDef Effect::effectMethods[] = {
@@ -112,7 +113,7 @@ void Effect::run()
}
else
{
std::cerr << "EFFECTENGINE ERROR: Unable to open script file " << _script << std::endl;
Error(Logger::getInstance("EFFECTENGINE"), "Unable to open script file %s", _script.c_str());
}
fclose(file);
@@ -356,7 +357,7 @@ Effect * Effect::getEffect()
{
// something is wrong
Py_XDECREF(module);
std::cerr << "EFFECTENGINE ERROR: Unable to retrieve the effect object from the Python runtime" << std::endl;
Error(Logger::getInstance("EFFECTENGINE"), "Unable to retrieve the effect object from the Python runtime");
return nullptr;
}
@@ -368,7 +369,7 @@ Effect * Effect::getEffect()
{
// something is wrong
Py_XDECREF(effectCapsule);
std::cerr << "EFFECTENGINE ERROR: Unable to retrieve the effect object from the Python runtime" << std::endl;
Error(Logger::getInstance("EFFECTENGINE"), "Unable to retrieve the effect object from the Python runtime");
return nullptr;
}