summaryrefslogtreecommitdiffstats
path: root/src/uscxml
diff options
context:
space:
mode:
Diffstat (limited to 'src/uscxml')
-rw-r--r--src/uscxml/Interpreter.cpp5
-rw-r--r--src/uscxml/debug/DebugSession.cpp4
-rw-r--r--src/uscxml/debug/DebuggerServlet.cpp4
-rw-r--r--src/uscxml/debug/DebuggerServlet.h6
-rw-r--r--src/uscxml/interpreter/BasicContentExecutor.cpp2
-rw-r--r--src/uscxml/interpreter/BasicEventQueue.cpp2
-rw-r--r--src/uscxml/interpreter/FastMicroStep.cpp2
-rw-r--r--src/uscxml/interpreter/InterpreterImpl.cpp2
-rw-r--r--src/uscxml/interpreter/Logging.cpp99
-rw-r--r--src/uscxml/interpreter/Logging.h96
-rw-r--r--src/uscxml/interpreter/LoggingImpl.h54
-rw-r--r--src/uscxml/interpreter/StdOutLogger.cpp41
-rw-r--r--src/uscxml/interpreter/StdOutLogger.h43
-rw-r--r--src/uscxml/messages/Data.cpp4
-rw-r--r--src/uscxml/messages/Event.h10
-rw-r--r--src/uscxml/plugins/Factory.cpp4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp4
-rw-r--r--src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp2
-rw-r--r--src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp2
-rw-r--r--src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp4
-rw-r--r--src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp4
-rw-r--r--src/uscxml/server/HTTPServer.cpp4
-rw-r--r--src/uscxml/transform/ChartToC.cpp2
-rw-r--r--src/uscxml/transform/ChartToJava.cpp2
-rw-r--r--src/uscxml/transform/ChartToPromela.cpp9
-rw-r--r--src/uscxml/transform/ChartToVHDL.cpp2
-rw-r--r--src/uscxml/util/DOM.cpp4
-rw-r--r--src/uscxml/util/URL.cpp4
29 files changed, 381 insertions, 44 deletions
diff --git a/src/uscxml/Interpreter.cpp b/src/uscxml/Interpreter.cpp
index 1e8c931..9f4322f 100644
--- a/src/uscxml/Interpreter.cpp
+++ b/src/uscxml/Interpreter.cpp
@@ -30,7 +30,7 @@
#include <xercesc/sax/HandlerBase.hpp>
#include <xercesc/util/XMLString.hpp>
#include <xercesc/util/PlatformUtils.hpp>
-#include "easylogging++.h"
+#include "uscxml/interpreter/Logging.h"
#include <iostream>
#include <boost/algorithm/string.hpp>
@@ -40,9 +40,6 @@
#include <memory>
#include <mutex>
-#include "easylogging++.h"
-INITIALIZE_EASYLOGGINGPP
-
#define VERBOSE 0
namespace uscxml {
diff --git a/src/uscxml/debug/DebugSession.cpp b/src/uscxml/debug/DebugSession.cpp
index 4d64443..116e20e 100644
--- a/src/uscxml/debug/DebugSession.cpp
+++ b/src/uscxml/debug/DebugSession.cpp
@@ -21,7 +21,7 @@
#include "uscxml/debug/Debugger.h"
#include "uscxml/util/Predicates.h"
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
namespace uscxml {
@@ -416,4 +416,4 @@ Data DebugSession::debugEval(const Data& data) {
}
-} \ No newline at end of file
+}
diff --git a/src/uscxml/debug/DebuggerServlet.cpp b/src/uscxml/debug/DebuggerServlet.cpp
index 34c1eca..5e3159b 100644
--- a/src/uscxml/debug/DebuggerServlet.cpp
+++ b/src/uscxml/debug/DebuggerServlet.cpp
@@ -238,10 +238,10 @@ void DebuggerServlet::processListSessions(const HTTPServer::Request& request) {
returnData(request, replyData);
}
+ /*
void DebuggerServlet::handle(const el::LogDispatchData* data) {
}
-/*
void DebuggerServlet::send(google::LogSeverity severity, const char* full_filename,
const char* base_filename, int line,
const struct ::tm* tm_time,
@@ -261,4 +261,4 @@ void DebuggerServlet::send(google::LogSeverity severity, const char* full_filena
}
*/
-} \ No newline at end of file
+}
diff --git a/src/uscxml/debug/DebuggerServlet.h b/src/uscxml/debug/DebuggerServlet.h
index a1f18e3..7e0f66b 100644
--- a/src/uscxml/debug/DebuggerServlet.h
+++ b/src/uscxml/debug/DebuggerServlet.h
@@ -21,7 +21,7 @@
#define DEBUGGERSERVLET_H_ATUMDA3G
#include "uscxml/Common.h"
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
#include "uscxml/util/BlockingQueue.h"
#include "uscxml/server/HTTPServer.h"
@@ -29,7 +29,7 @@
namespace uscxml {
-class USCXML_API DebuggerServlet : public Debugger, public HTTPServlet, public el::LogDispatchCallback {
+class USCXML_API DebuggerServlet : public Debugger, public HTTPServlet, public Logger {
public:
class LogMessage : public Data {
public:
@@ -91,8 +91,8 @@ public:
const char* base_filename, int line,
const struct ::tm* tm_time,
const char* message, size_t message_len);
+ void handle(const el::LogDispatchData* data);
*/
- void handle(const el::LogDispatchData* data);
protected:
void serverPushData(std::shared_ptr<DebugSession>);
diff --git a/src/uscxml/interpreter/BasicContentExecutor.cpp b/src/uscxml/interpreter/BasicContentExecutor.cpp
index a2ebc5c..1cf9c2f 100644
--- a/src/uscxml/interpreter/BasicContentExecutor.cpp
+++ b/src/uscxml/interpreter/BasicContentExecutor.cpp
@@ -29,7 +29,7 @@
#include <xercesc/sax/HandlerBase.hpp>
#include <xercesc/framework/MemBufInputSource.hpp>
-#include "easylogging++.h"
+#include "uscxml/interpreter/Logging.h"
namespace uscxml {
diff --git a/src/uscxml/interpreter/BasicEventQueue.cpp b/src/uscxml/interpreter/BasicEventQueue.cpp
index 78b2321..04ffc7c 100644
--- a/src/uscxml/interpreter/BasicEventQueue.cpp
+++ b/src/uscxml/interpreter/BasicEventQueue.cpp
@@ -22,7 +22,7 @@
#include <event2/thread.h>
#include <assert.h>
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
namespace uscxml {
diff --git a/src/uscxml/interpreter/FastMicroStep.cpp b/src/uscxml/interpreter/FastMicroStep.cpp
index 90b93ee..8711b62 100644
--- a/src/uscxml/interpreter/FastMicroStep.cpp
+++ b/src/uscxml/interpreter/FastMicroStep.cpp
@@ -26,7 +26,7 @@
#include "uscxml/util/Convenience.h"
#include "uscxml/interpreter/InterpreterMonitor.h"
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
#define BIT_ANY_SET(b) (!b.none())
#define BIT_HAS(idx, bitset) (bitset[idx])
diff --git a/src/uscxml/interpreter/InterpreterImpl.cpp b/src/uscxml/interpreter/InterpreterImpl.cpp
index d3b044a..7b79988 100644
--- a/src/uscxml/interpreter/InterpreterImpl.cpp
+++ b/src/uscxml/interpreter/InterpreterImpl.cpp
@@ -28,7 +28,7 @@
#include "uscxml/util/Predicates.h"
#include "uscxml/plugins/InvokerImpl.h"
-#include "easylogging++.h"
+#include "uscxml/interpreter/Logging.h"
#include <iostream>
diff --git a/src/uscxml/interpreter/Logging.cpp b/src/uscxml/interpreter/Logging.cpp
new file mode 100644
index 0000000..bdb847a
--- /dev/null
+++ b/src/uscxml/interpreter/Logging.cpp
@@ -0,0 +1,99 @@
+/**
+ * @file
+ * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de)
+ * @copyright Simplified BSD
+ *
+ * @cond
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the FreeBSD license as published by the FreeBSD
+ * project.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the FreeBSD license along with this
+ * program. If not, see <http://www.opensource.org/licenses/bsd-license>.
+ * @endcond
+ */
+
+#include "Logging.h"
+#include "LoggingImpl.h"
+
+// for default logger
+#include "StdOutLogger.h"
+
+namespace uscxml {
+
+std::shared_ptr<LoggerImpl> LoggerImpl::_defaultLogger;
+
+std::shared_ptr<LoggerImpl> LoggerImpl::getDefault() {
+ if (!_defaultLogger)
+ _defaultLogger = std::shared_ptr<LoggerImpl>(new StdOutLogger());
+ return _defaultLogger;
+}
+
+Logger Logger::getDefault() {
+ return LoggerImpl::getDefault();
+}
+
+void log(LogSeverity severity, const Event& event) {
+ LoggerImpl::getDefault()->log(severity, event);
+}
+
+void log(LogSeverity severity, const Data& data) {
+ LoggerImpl::getDefault()->log(severity, data);
+}
+
+void Logger::log(LogSeverity severity, const Event& event) {
+ _impl->log(severity, event);
+}
+
+void Logger::log(LogSeverity severity, const Data& data) {
+ _impl->log(severity, data);
+}
+
+void Logger::log(LogSeverity severity, const std::string& message) {
+ _impl->log(severity, message);
+}
+
+StreamLogger Logger::log(LogSeverity severity) {
+ return StreamLogger(severity, _impl);
+}
+
+StreamLogger::~StreamLogger() {
+ _logger->log(_severity, ss.str());
+}
+
+std::shared_ptr<LoggerImpl> Logger::getImpl() const {
+ return _impl;
+}
+
+std::ostream& StreamLogger::operator<<(const std::string& message) {
+ ss << message; //_logger->log(_severity, event);
+ return ss;
+}
+
+std::string Logger::severityToString(LogSeverity severity) {
+ switch (severity) {
+ case USCXML_SCXML:
+ return "Interpreter";
+ case USCXML_TRACE:
+ return "Trace";
+ case USCXML_DEBUG:
+ return "Debug";
+ case USCXML_INFO:
+ return "Info";
+ case USCXML_WARN:
+ return "Warning";
+ case USCXML_ERROR:
+ return "Error";
+ case USCXML_FATAL:
+ return "Fatal";
+ default:
+ return "Unknown";
+
+ }
+}
+
+}
diff --git a/src/uscxml/interpreter/Logging.h b/src/uscxml/interpreter/Logging.h
new file mode 100644
index 0000000..7746998
--- /dev/null
+++ b/src/uscxml/interpreter/Logging.h
@@ -0,0 +1,96 @@
+/**
+ * @file
+ * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de)
+ * @copyright Simplified BSD
+ *
+ * @cond
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the FreeBSD license as published by the FreeBSD
+ * project.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the FreeBSD license along with this
+ * program. If not, see <http://www.opensource.org/licenses/bsd-license>.
+ * @endcond
+ */
+
+#ifndef LOGGING_H_3B1A3A0F
+#define LOGGING_H_3B1A3A0F
+
+#include "uscxml/config.h"
+#include "uscxml/Common.h"
+
+#include "uscxml/messages/Data.h"
+#include "uscxml/messages/Event.h"
+
+#include <memory>
+
+#define LOG(lvl) uscxml::Logger::getDefault().log(lvl)
+#define LOG2(lvl, thing) uscxml::Logger::getDefault().log(lvl, thing);
+
+#define SCXML USCXML_SCXML
+#define TRACE USCXML_TRACE
+#define DEBUG USCXML_DEBUG
+#define INFO USCXML_INFO
+#define WARNING USCXML_WARN
+#define ERROR USCXML_ERROR
+#define FATAL USCXML_FATAL
+
+namespace uscxml {
+
+enum LogSeverity {
+ USCXML_SCXML,
+ USCXML_TRACE,
+ USCXML_DEBUG,
+ USCXML_INFO,
+ USCXML_WARN,
+ USCXML_ERROR,
+ USCXML_FATAL
+};
+
+class LoggerImpl;
+
+void log(LogSeverity severity, const Event& event);
+void log(LogSeverity severity, const Data& data);
+
+class StreamLogger {
+public:
+ std::ostream& operator<<(const std::string& message);
+ ~StreamLogger();
+
+protected:
+ StreamLogger(LogSeverity severity, std::shared_ptr<LoggerImpl> logger) : _severity(severity), _logger(logger) {}
+ StreamLogger(const StreamLogger& other) : _severity(other._severity), _logger(other._logger) {}
+
+ LogSeverity _severity;
+ std::shared_ptr<LoggerImpl> _logger;
+ std::stringstream ss;
+
+ friend class Logger;
+};
+
+class USCXML_API Logger {
+public:
+ PIMPL_OPERATORS(Logger);
+
+ virtual void log(LogSeverity severity, const Event& event);
+ virtual void log(LogSeverity severity, const Data& data);
+ virtual void log(LogSeverity severity, const std::string& message);
+
+ virtual StreamLogger log(LogSeverity severity);
+ static std::string severityToString(LogSeverity severity);
+
+ static Logger getDefault();
+
+ std::shared_ptr<LoggerImpl> getImpl() const;
+protected:
+ std::shared_ptr<LoggerImpl> _impl;
+
+};
+
+}
+
+#endif /* end of include guard: LOGGING_H_3B1A3A0F */
diff --git a/src/uscxml/interpreter/LoggingImpl.h b/src/uscxml/interpreter/LoggingImpl.h
new file mode 100644
index 0000000..c6003ca
--- /dev/null
+++ b/src/uscxml/interpreter/LoggingImpl.h
@@ -0,0 +1,54 @@
+/**
+ * @file
+ * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de)
+ * @copyright Simplified BSD
+ *
+ * @cond
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the FreeBSD license as published by the FreeBSD
+ * project.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the FreeBSD license along with this
+ * program. If not, see <http://www.opensource.org/licenses/bsd-license>.
+ * @endcond
+ */
+
+#ifndef LOGGINGIMPL_H_CF00F49B
+#define LOGGINGIMPL_H_CF00F49B
+
+#include "uscxml/config.h"
+#include "uscxml/Common.h"
+
+#include "Logging.h"
+
+#include "uscxml/messages/Data.h"
+#include "uscxml/messages/Event.h"
+
+namespace uscxml {
+
+/**
+* @ingroup impl
+*/
+class USCXML_API LoggerImpl {
+public:
+
+ LoggerImpl() {}
+ virtual std::shared_ptr<LoggerImpl> create() = 0;
+
+ virtual void log(LogSeverity severity, const Event& event) = 0;
+ virtual void log(LogSeverity severity, const Data& data) = 0;
+ virtual void log(LogSeverity severity, const std::string& message) = 0;
+
+ static std::shared_ptr<LoggerImpl> getDefault();
+
+private:
+ static std::shared_ptr<LoggerImpl> _defaultLogger;
+};
+
+}
+
+#endif /* end of include guard: LOGGINGIMPL_H_CF00F49B */
diff --git a/src/uscxml/interpreter/StdOutLogger.cpp b/src/uscxml/interpreter/StdOutLogger.cpp
new file mode 100644
index 0000000..1794c1f
--- /dev/null
+++ b/src/uscxml/interpreter/StdOutLogger.cpp
@@ -0,0 +1,41 @@
+/**
+ * @file
+ * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de)
+ * @copyright Simplified BSD
+ *
+ * @cond
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the FreeBSD license as published by the FreeBSD
+ * project.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the FreeBSD license along with this
+ * program. If not, see <http://www.opensource.org/licenses/bsd-license>.
+ * @endcond
+ */
+
+#include "StdOutLogger.h"
+#include <iostream>
+
+namespace uscxml {
+
+std::shared_ptr<LoggerImpl> StdOutLogger::create() {
+ return std::shared_ptr<LoggerImpl>(new StdOutLogger());
+}
+
+void StdOutLogger::log(LogSeverity severity, const std::string& message) {
+ std::cout << Logger::severityToString(severity) << ": " << message << std::endl;
+}
+
+void StdOutLogger::log(LogSeverity severity, const Event& event) {
+ std::cout << Logger::severityToString(severity) << ": " << event << std::endl;
+}
+
+void StdOutLogger::log(LogSeverity severity, const Data& data) {
+ std::cout << Logger::severityToString(severity) << ": " << data << std::endl;
+}
+
+}
diff --git a/src/uscxml/interpreter/StdOutLogger.h b/src/uscxml/interpreter/StdOutLogger.h
new file mode 100644
index 0000000..fbc006f
--- /dev/null
+++ b/src/uscxml/interpreter/StdOutLogger.h
@@ -0,0 +1,43 @@
+/**
+ * @file
+ * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de)
+ * @copyright Simplified BSD
+ *
+ * @cond
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the FreeBSD license as published by the FreeBSD
+ * project.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the FreeBSD license along with this
+ * program. If not, see <http://www.opensource.org/licenses/bsd-license>.
+ * @endcond
+ */
+
+#ifndef STDOUTLOGGER_H_1A28C761
+#define STDOUTLOGGER_H_1A28C761
+
+#include "LoggingImpl.h"
+
+namespace uscxml {
+
+class USCXML_API StdOutLogger : public LoggerImpl {
+public:
+ StdOutLogger() {}
+ virtual ~StdOutLogger() {}
+
+ virtual std::shared_ptr<LoggerImpl> create();
+
+ virtual void log(LogSeverity severity, const std::string& message);
+ virtual void log(LogSeverity severity, const Event& event);
+ virtual void log(LogSeverity severity, const Data& data);
+
+};
+
+
+}
+
+#endif /* end of include guard: STDOUTLOGGER_H_1A28C761 */
diff --git a/src/uscxml/messages/Data.cpp b/src/uscxml/messages/Data.cpp
index 089de96..a75e774 100644
--- a/src/uscxml/messages/Data.cpp
+++ b/src/uscxml/messages/Data.cpp
@@ -24,7 +24,7 @@
#include "uscxml/util/DOM.h"
-#include "easylogging++.h"
+#include "uscxml/interpreter/Logging.h"
#ifdef HAS_STRING_H
#include <string.h>
@@ -290,4 +290,4 @@ std::string Data::toJSON(const Data& data) {
return os.str();
}
-} \ No newline at end of file
+}
diff --git a/src/uscxml/messages/Event.h b/src/uscxml/messages/Event.h
index 8b7bb91..2edbd3e 100644
--- a/src/uscxml/messages/Event.h
+++ b/src/uscxml/messages/Event.h
@@ -90,7 +90,7 @@ public:
};
Event() : eventType(INTERNAL), hideSendId(false), uuid(UUID::getUUID()) {}
- Event(const std::string& name, Type type = INTERNAL) : name(name), eventType(type), hideSendId(false) {}
+ explicit Event(const std::string& name, Type type = INTERNAL) : name(name), eventType(type), hideSendId(false) {}
bool operator< (const Event& other) const {
return this < &other;
}
@@ -109,6 +109,12 @@ public:
return name.size() > 0;
}
+ operator std::string() {
+ std::stringstream ss;
+ ss << *this;
+ return ss.str();
+ }
+
typedef std::multimap<std::string, Data> params_t;
typedef std::map<std::string, Data> namelist_t;
@@ -192,7 +198,7 @@ class USCXML_API ErrorEvent : public Event {
public:
ErrorEvent() : Event() {}
ErrorEvent(const std::string& msg) : Event("error.platform") {
- data.compound["msg"] = msg;
+ data.compound["msg"] = Data(msg, Data::VERBATIM);
}
};
diff --git a/src/uscxml/plugins/Factory.cpp b/src/uscxml/plugins/Factory.cpp
index a60fe4c..443cb59 100644
--- a/src/uscxml/plugins/Factory.cpp
+++ b/src/uscxml/plugins/Factory.cpp
@@ -22,7 +22,7 @@
#include "uscxml/plugins/Factory.h"
#include "uscxml/messages/Data.h"
#include "uscxml/Interpreter.h"
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
#include "uscxml/plugins/ExecutableContentImpl.h"
@@ -525,4 +525,4 @@ void InvokerImpl::eventToSCXML(Event& event,
Factory* Factory::_instance = NULL;
std::string Factory::_defaultPluginPath;
-} \ No newline at end of file
+}
diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp
index bdb8939..aae0111 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp
@@ -26,7 +26,7 @@
#include "uscxml/messages/Event.h"
#include "uscxml/util/DOM.h"
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
#include <boost/algorithm/string.hpp>
@@ -879,4 +879,4 @@ void JSCDataModel::jsInvokerListProps(JSContextRef ctx, JSObjectRef object, JSPr
}
}
-} \ No newline at end of file
+}
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
index 0205674..3ff48c4 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
@@ -31,7 +31,7 @@
#include "uscxml/messages/Event.h"
#include "uscxml/util/DOM.h"
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
#include <boost/algorithm/string.hpp>
@@ -866,4 +866,4 @@ void V8DataModel::throwExceptionEvent(const v8::TryCatch& tryCatch) {
throw(exceptionEvent);
}
-} \ No newline at end of file
+}
diff --git a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp
index ed96622..6429cba 100644
--- a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp
+++ b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp
@@ -31,7 +31,7 @@
#include "uscxml/messages/Event.h"
#include "uscxml/util/DOM.h"
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
#include <boost/algorithm/string.hpp>
//#include "LuaDOM.cpp.inc"
diff --git a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp b/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp
index 458e372..4c5674e 100644
--- a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp
+++ b/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp
@@ -29,7 +29,7 @@
#include "PromelaParser.h"
#include "parser/promela.tab.hpp"
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
#ifdef BUILD_AS_PLUGINS
#include <Pluma/Connector.hpp>
diff --git a/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp b/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp
index 08a0be8..fca6e11 100644
--- a/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp
+++ b/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp
@@ -33,7 +33,7 @@
#endif
#include <boost/algorithm/string.hpp>
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
namespace uscxml {
@@ -446,4 +446,4 @@ void DirectoryWatch::updateEntries(bool reportAsExisting) {
}
}
-} \ No newline at end of file
+}
diff --git a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp
index 564977d..d6993dc 100644
--- a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp
+++ b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp
@@ -30,7 +30,7 @@
#include <string.h>
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
#include <boost/algorithm/string.hpp>
#ifdef _WIN32
@@ -315,4 +315,4 @@ void BasicHTTPIOProcessor::downloadFailed(const URL& url, int errorCode) {
}
-} \ No newline at end of file
+}
diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp
index 679ab67..a5dcb8b 100644
--- a/src/uscxml/server/HTTPServer.cpp
+++ b/src/uscxml/server/HTTPServer.cpp
@@ -40,7 +40,7 @@ extern "C" {
#include <event2/thread.h>
}
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
#include <boost/algorithm/string.hpp>
#ifndef _WIN32
@@ -791,4 +791,4 @@ void HTTPServer::sslGeneralBufferEventCallback (struct evhttp_request *req, void
}
#endif
-} \ No newline at end of file
+}
diff --git a/src/uscxml/transform/ChartToC.cpp b/src/uscxml/transform/ChartToC.cpp
index 10eee0c..932ac73 100644
--- a/src/uscxml/transform/ChartToC.cpp
+++ b/src/uscxml/transform/ChartToC.cpp
@@ -26,7 +26,7 @@
#include "uscxml/util/String.h"
#include <math.h>
#include <boost/algorithm/string.hpp>
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
#include <algorithm>
#include <iomanip>
diff --git a/src/uscxml/transform/ChartToJava.cpp b/src/uscxml/transform/ChartToJava.cpp
index f31db71..8d4d61e 100644
--- a/src/uscxml/transform/ChartToJava.cpp
+++ b/src/uscxml/transform/ChartToJava.cpp
@@ -22,7 +22,7 @@
#include "uscxml/util/String.h"
#include <boost/algorithm/string.hpp>
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
#include <algorithm>
namespace uscxml {
diff --git a/src/uscxml/transform/ChartToPromela.cpp b/src/uscxml/transform/ChartToPromela.cpp
index 5dcf9f0..a140386 100644
--- a/src/uscxml/transform/ChartToPromela.cpp
+++ b/src/uscxml/transform/ChartToPromela.cpp
@@ -24,19 +24,20 @@
#include "uscxml/plugins/datamodel/promela/parser/promela.tab.hpp"
#include <boost/algorithm/string.hpp>
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
#include <algorithm>
+#include <cmath>
#define ADAPT_SRC(code) _analyzer->adaptCode(code, _prefix)
-#define BIT_WIDTH(number) (number > 1 ? (int)ceil(log((double)number) / log((double)2.0)) : 1)
+#define BIT_WIDTH(number) (number > 1 ? (int)ceil(log2((double)number)) : 1)
#define EVENT_NAME (_analyzer->usesComplexEventStruct() ? "_event.name" : "_event")
#define TMP_EVENT_NAME (_analyzer->usesComplexEventStruct() ? "_tmpE.name" : "_tmpE")
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
-#define TRACE
+#define TRACE_PML
-#ifdef TRACE
+#ifdef TRACE_PML
#define TRACE_EXECUTION_V(fmt, ...) \
stream << std::endl; \
stream << "#if TRACE_EXECUTION" << std::endl; \
diff --git a/src/uscxml/transform/ChartToVHDL.cpp b/src/uscxml/transform/ChartToVHDL.cpp
index a55a4ca..4922f22 100644
--- a/src/uscxml/transform/ChartToVHDL.cpp
+++ b/src/uscxml/transform/ChartToVHDL.cpp
@@ -24,7 +24,7 @@
#include <math.h>
#include <boost/algorithm/string.hpp>
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
#include <iostream>
#include <algorithm>
diff --git a/src/uscxml/util/DOM.cpp b/src/uscxml/util/DOM.cpp
index 1de6423..cc1e2d7 100644
--- a/src/uscxml/util/DOM.cpp
+++ b/src/uscxml/util/DOM.cpp
@@ -29,7 +29,7 @@
#include <xercesc/dom/DOM.hpp>
#include <xercesc/framework/StdOutFormatTarget.hpp>
-#include "easylogging++.h"
+#include "uscxml/interpreter/Logging.h"
//#include <glog/logging.h>
//#include <boost/algorithm/string.hpp>
@@ -392,4 +392,4 @@ std::list<DOMNode*> DOMUtils::filterChildType(const DOMNode::NodeType type,
}
-} \ No newline at end of file
+}
diff --git a/src/uscxml/util/URL.cpp b/src/uscxml/util/URL.cpp
index 79a0ad9..1dd6154 100644
--- a/src/uscxml/util/URL.cpp
+++ b/src/uscxml/util/URL.cpp
@@ -23,7 +23,7 @@
#include <string>
#include <cassert>
-#include <easylogging++.h>
+#include "uscxml/interpreter/Logging.h"
#include "uscxml/config.h"
@@ -784,4 +784,4 @@ URLFetcher* URLFetcher::getInstance() {
}
-} \ No newline at end of file
+}