diff options
author | Stefan Radomski <github@mintwerk.de> | 2016-12-12 15:19:14 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2016-12-12 15:19:14 (GMT) |
commit | 047a35fc691a348008cbfbf4c3d7722a6ec4f93e (patch) | |
tree | 362a55496c4185b0be5966073d43d00e1b0e27de /src/uscxml/plugins/datamodel | |
parent | dcac58f473789dd07e9094e61f819aef2fbc4b4a (diff) | |
download | uscxml-047a35fc691a348008cbfbf4c3d7722a6ec4f93e.zip uscxml-047a35fc691a348008cbfbf4c3d7722a6ec4f93e.tar.gz uscxml-047a35fc691a348008cbfbf4c3d7722a6ec4f93e.tar.bz2 |
Custom logging for interpreters
Diffstat (limited to 'src/uscxml/plugins/datamodel')
3 files changed, 15 insertions, 15 deletions
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp index f916ae9..283372d 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp @@ -485,27 +485,27 @@ Data V8DataModel::getValueAsData(const v8::Local<v8::Value>& value, std::set<v8: } else if (value->IsBoolean()) { data.atom = (value->ToBoolean()->Value() ? "true" : "false"); } else if (value->IsBooleanObject()) { - LOG(USCXML_ERROR) << "IsBooleanObject is unimplemented" << std::endl; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "IsBooleanObject is unimplemented" << std::endl; } else if (value->IsDate()) { - LOG(USCXML_ERROR) << "IsDate is unimplemented" << std::endl; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "IsDate is unimplemented" << std::endl; } else if (value->IsExternal()) { - LOG(USCXML_ERROR) << "IsExternal is unimplemented" << std::endl; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "IsExternal is unimplemented" << std::endl; } else if (value->IsFalse()) { - LOG(USCXML_ERROR) << "IsFalse is unimplemented" << std::endl; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "IsFalse is unimplemented" << std::endl; } else if (value->IsFunction()) { - LOG(USCXML_ERROR) << "IsFunction is unimplemented" << std::endl; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "IsFunction is unimplemented" << std::endl; } else if (value->IsInt32()) { int32_t prop = value->Int32Value(); data.atom = toStr(prop); } else if (value->IsNativeError()) { - LOG(USCXML_ERROR) << "IsNativeError is unimplemented" << std::endl; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "IsNativeError is unimplemented" << std::endl; } else if (value->IsNull()) { - LOG(USCXML_ERROR) << "IsNull is unimplemented" << std::endl; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "IsNull is unimplemented" << std::endl; } else if (value->IsNumber()) { v8::String::AsciiValue prop(v8::Local<v8::String>::Cast(v8::Local<v8::Number>::Cast(value))); data.atom = *prop; } else if (value->IsNumberObject()) { - LOG(USCXML_ERROR) << "IsNumberObject is unimplemented" << std::endl; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "IsNumberObject is unimplemented" << std::endl; } else if (value->IsObject()) { // if (V8ArrayBuffer::hasInstance(value)) { @@ -529,21 +529,21 @@ Data V8DataModel::getValueAsData(const v8::Local<v8::Value>& value, std::set<v8: data.compound[*key] = getValueAsData(property, alreadySeen); } } else if (value->IsRegExp()) { - LOG(USCXML_ERROR) << "IsRegExp is unimplemented" << std::endl; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "IsRegExp is unimplemented" << std::endl; } else if(value->IsString()) { v8::String::AsciiValue property(v8::Local<v8::String>::Cast(value)); data.atom = *property; data.type = Data::VERBATIM; } else if(value->IsStringObject()) { - LOG(USCXML_ERROR) << "IsStringObject is unimplemented" << std::endl; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "IsStringObject is unimplemented" << std::endl; } else if(value->IsTrue()) { - LOG(USCXML_ERROR) << "IsTrue is unimplemented" << std::endl; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "IsTrue is unimplemented" << std::endl; } else if(value->IsUint32()) { - LOG(USCXML_ERROR) << "IsUint32 is unimplemented" << std::endl; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "IsUint32 is unimplemented" << std::endl; } else if(value->IsUndefined()) { data.atom = "undefined"; } else { - LOG(USCXML_ERROR) << "Value's type is unknown!" << std::endl; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "Value's type is unknown!" << std::endl; } return data; } diff --git a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp index 55c4501..2ad89b5 100644 --- a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp +++ b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp @@ -204,7 +204,7 @@ std::shared_ptr<DataModelImpl> LuaDataModel::create(DataModelCallbacks* callback luabridge::setGlobal(dm->_luaState, resultLxpLOM, "lxp.lom"); } } catch (luabridge::LuaException e) { - LOG(USCXML_INFO) << e.what(); + LOG(_callbacks->getLogger(), USCXML_INFO) << e.what(); } luabridge::getGlobalNamespace(dm->_luaState).beginClass<LuaDataModel>("DataModel").endClass(); diff --git a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp b/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp index a13dd07..a524c7e 100644 --- a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp +++ b/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp @@ -193,7 +193,7 @@ void PromelaDataModel::setEvent(const Event& event) { try { PromelaParser parser(expr); } catch (Event e) { - LOG(USCXML_ERROR) << e << std::endl; + LOG(_callbacks->getLogger(), USCXML_ERROR) << e << std::endl; return false; } return true; |