summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2017-04-27 07:41:43 (GMT)
committerStefan Radomski <github@mintwerk.de>2017-04-27 07:42:40 (GMT)
commit8015ce2701862e6977fe12cde839a35ddb4c32e5 (patch)
treeb9e09526e0bb88e2b97d4998387e0322a497185c
parenta925b941c640289ffd967cab457ab804de69399a (diff)
downloaduscxml-8015ce2701862e6977fe12cde839a35ddb4c32e5.zip
uscxml-8015ce2701862e6977fe12cde839a35ddb4c32e5.tar.gz
uscxml-8015ce2701862e6977fe12cde839a35ddb4c32e5.tar.bz2
Fixed issue113 for real
-rw-r--r--src/uscxml/interpreter/BasicContentExecutor.cpp4
-rw-r--r--src/uscxml/interpreter/StdOutLogger.cpp6
-rw-r--r--src/uscxml/server/HTTPServer.cpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/uscxml/interpreter/BasicContentExecutor.cpp b/src/uscxml/interpreter/BasicContentExecutor.cpp
index f9da79e..3d58973 100644
--- a/src/uscxml/interpreter/BasicContentExecutor.cpp
+++ b/src/uscxml/interpreter/BasicContentExecutor.cpp
@@ -276,14 +276,14 @@ void BasicContentExecutor::processLog(XERCESC_NS::DOMElement* content) {
std::string expr = ATTR(content, kXMLCharExpr);
Data d = _callbacks->evalAsData(expr);
-#if 1
+#if 0
if (label.size() > 0) {
_callbacks->getLogger().log(USCXML_LOG) << label << ": ";
}
_callbacks->getLogger().log(USCXML_LOG) << d << std::endl;
#else
// see issue113
- _callbacks->getLogger().log(USCXML_LOG) << (label.size() > 0 ? label + ":" : "") << d << std::endl;
+ _callbacks->getLogger().log(USCXML_LOG) << (label.size() > 0 ? label + ":" : "") << d << std::endl;
#endif
}
diff --git a/src/uscxml/interpreter/StdOutLogger.cpp b/src/uscxml/interpreter/StdOutLogger.cpp
index 76a2169..152df1c 100644
--- a/src/uscxml/interpreter/StdOutLogger.cpp
+++ b/src/uscxml/interpreter/StdOutLogger.cpp
@@ -27,15 +27,15 @@ std::shared_ptr<LoggerImpl> StdOutLogger::create() {
}
void StdOutLogger::log(LogSeverity severity, const std::string& message) {
- std::cout << (severity != USCXML_VERBATIM ? Logger::severityToString(severity) + ": " : "") << message << std::flush;
+ std::cout << (severity != USCXML_VERBATIM ? "[" + Logger::severityToString(severity) + "] " : "") << message << std::flush;
}
void StdOutLogger::log(LogSeverity severity, const Event& event) {
- std::cout << (severity != USCXML_VERBATIM ? Logger::severityToString(severity) + ": " : "") << event << std::flush;
+ std::cout << (severity != USCXML_VERBATIM ? "[" + Logger::severityToString(severity) + "] " : "") << event << std::flush;
}
void StdOutLogger::log(LogSeverity severity, const Data& data) {
- std::cout << (severity != USCXML_VERBATIM ? Logger::severityToString(severity) + ": " : "") << data << std::flush;
+ std::cout << (severity != USCXML_VERBATIM ? "[" + Logger::severityToString(severity) + "] " : "") << data << std::flush;
}
}
diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp
index e1ac6bc..5c56a8d 100644
--- a/src/uscxml/server/HTTPServer.cpp
+++ b/src/uscxml/server/HTTPServer.cpp
@@ -92,9 +92,9 @@ HTTPServer::HTTPServer(unsigned short port, unsigned short wsPort, SSLConfig* ss
if (_port > 0) {
_httpHandle = evhttp_bind_socket_with_handle(_http, NULL, _port);
if (_httpHandle) {
- LOGD(USCXML_INFO) << "HTTP server listening on tcp/" << _port << std::endl;;
+ LOGD(USCXML_INFO) << "HTTP server listening on tcp/" << _port << std::endl;;
} else {
- LOGD(USCXML_ERROR) << "HTTP server cannot bind to tcp/" << _port << std::endl;
+ LOGD(USCXML_ERROR) << "HTTP server cannot bind to tcp/" << _port << std::endl;
}
}