mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Rework log messages
Former-commit-id: eac93c0fd78fdf353e940d08df3cabf0b962a3e2
This commit is contained in:
@@ -112,7 +112,7 @@ void Effect::run()
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Unable to open script file " << _script << std::endl;
|
||||
std::cerr << "EFFECTENGINE ERROR: Unable to open script file " << _script << std::endl;
|
||||
}
|
||||
|
||||
// Clean up the thread state
|
||||
@@ -355,7 +355,7 @@ Effect * Effect::getEffect()
|
||||
{
|
||||
// something is wrong
|
||||
Py_XDECREF(module);
|
||||
std::cerr << "Unable to retrieve the effect object from the Python runtime" << std::endl;
|
||||
std::cerr << "EFFECTENGINE ERROR: Unable to retrieve the effect object from the Python runtime" << std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ Effect * Effect::getEffect()
|
||||
{
|
||||
// something is wrong
|
||||
Py_XDECREF(effectCapsule);
|
||||
std::cerr << "Unable to retrieve the effect object from the Python runtime" << std::endl;
|
||||
std::cerr << "EFFECTENGINE ERROR: Unable to retrieve the effect object from the Python runtime" << std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,7 @@ EffectEngine::EffectEngine(Hyperion * hyperion, const Json::Value & jsonEffectCo
|
||||
QDir directory(QString::fromStdString(path));
|
||||
if (!directory.exists())
|
||||
{
|
||||
std::cerr << "Effect directory can not be loaded: " << path << std::endl;
|
||||
std::cerr << "EFFECTENGINE ERROR: Effect directory can not be loaded: " << path << std::endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ EffectEngine::EffectEngine(Hyperion * hyperion, const Json::Value & jsonEffectCo
|
||||
}
|
||||
|
||||
// initialize the python interpreter
|
||||
std::cout << "Initializing Python interpreter" << std::endl;
|
||||
std::cout << "EFFECTENGINE INFO: Initializing Python interpreter" << std::endl;
|
||||
Effect::registerHyperionExtensionModule();
|
||||
Py_InitializeEx(0);
|
||||
PyEval_InitThreads(); // Create the GIL
|
||||
@@ -63,7 +63,7 @@ EffectEngine::EffectEngine(Hyperion * hyperion, const Json::Value & jsonEffectCo
|
||||
EffectEngine::~EffectEngine()
|
||||
{
|
||||
// clean up the Python interpreter
|
||||
std::cout << "Cleaning up Python interpreter" << std::endl;
|
||||
std::cout << "EFFECTENGINE INFO: Cleaning up Python interpreter" << std::endl;
|
||||
PyEval_RestoreThread(_mainThreadState);
|
||||
Py_Finalize();
|
||||
}
|
||||
@@ -84,7 +84,7 @@ bool EffectEngine::loadEffectDefinition(const std::string &path, const std::stri
|
||||
|
||||
if (!file.is_open())
|
||||
{
|
||||
std::cerr << "Effect file '" << fileName << "' could not be loaded" << std::endl;
|
||||
std::cerr << "EFFECTENGINE ERROR: Effect file '" << fileName << "' could not be loaded" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ bool EffectEngine::loadEffectDefinition(const std::string &path, const std::stri
|
||||
Json::Value config;
|
||||
if (!jsonReader.parse(file, config, false))
|
||||
{
|
||||
std::cerr << "Error while reading effect '" << fileName << "': " << jsonReader.getFormattedErrorMessages() << std::endl;
|
||||
std::cerr << "EFFECTENGINE ERROR: Error while reading effect '" << fileName << "': " << jsonReader.getFormattedErrorMessages() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ bool EffectEngine::loadEffectDefinition(const std::string &path, const std::stri
|
||||
{
|
||||
const std::list<std::string> & errors = schemaChecker.getMessages();
|
||||
foreach (const std::string & error, errors) {
|
||||
std::cerr << "Error while checking '" << fileName << "':" << error << std::endl;
|
||||
std::cerr << "EFFECTENGINE ERROR: Error while checking '" << fileName << "':" << error << std::endl;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -121,8 +121,8 @@ bool EffectEngine::loadEffectDefinition(const std::string &path, const std::stri
|
||||
#endif
|
||||
effectDefinition.args = config["args"];
|
||||
|
||||
// return succes
|
||||
std::cout << "Effect loaded: " + effectDefinition.name << std::endl;
|
||||
// return succes //BLACKLIST OUTPUT TO LOG (Spam). This is more a effect development thing and the list gets longer and longer
|
||||
// std::cout << "EFFECTENGINE INFO: Effect loaded: " + effectDefinition.name << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ int EffectEngine::runEffect(const std::string &effectName, int priority, int tim
|
||||
|
||||
int EffectEngine::runEffect(const std::string &effectName, const Json::Value &args, int priority, int timeout)
|
||||
{
|
||||
std::cout << "run effect " << effectName << " on channel " << priority << std::endl;
|
||||
std::cout << "EFFECTENGINE INFO: run effect " << effectName << " on channel " << priority << std::endl;
|
||||
|
||||
const EffectDefinition * effectDefinition = nullptr;
|
||||
for (const EffectDefinition & e : _availableEffects)
|
||||
@@ -147,7 +147,7 @@ int EffectEngine::runEffect(const std::string &effectName, const Json::Value &ar
|
||||
if (effectDefinition == nullptr)
|
||||
{
|
||||
// no such effect
|
||||
std::cerr << "effect " << effectName << " not found" << std::endl;
|
||||
std::cerr << "EFFECTENGINE ERROR: effect " << effectName << " not found" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ void EffectEngine::effectFinished(Effect *effect)
|
||||
_hyperion->clear(effect->getPriority());
|
||||
}
|
||||
|
||||
std::cout << "effect finished" << std::endl;
|
||||
std::cout << "EFFECTENGINE INFO: effect finished" << std::endl;
|
||||
for (auto effectIt = _activeEffects.begin(); effectIt != _activeEffects.end(); ++effectIt)
|
||||
{
|
||||
if (*effectIt == effect)
|
||||
|
Reference in New Issue
Block a user