summaryrefslogtreecommitdiffstats
path: root/src/uscxml/server/HTTPServer.cpp
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-12-12 15:19:14 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-12-12 15:19:14 (GMT)
commit047a35fc691a348008cbfbf4c3d7722a6ec4f93e (patch)
tree362a55496c4185b0be5966073d43d00e1b0e27de /src/uscxml/server/HTTPServer.cpp
parentdcac58f473789dd07e9094e61f819aef2fbc4b4a (diff)
downloaduscxml-047a35fc691a348008cbfbf4c3d7722a6ec4f93e.zip
uscxml-047a35fc691a348008cbfbf4c3d7722a6ec4f93e.tar.gz
uscxml-047a35fc691a348008cbfbf4c3d7722a6ec4f93e.tar.bz2
Custom logging for interpreters
Diffstat (limited to 'src/uscxml/server/HTTPServer.cpp')
-rw-r--r--src/uscxml/server/HTTPServer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp
index 82e5cef..ab16887 100644
--- a/src/uscxml/server/HTTPServer.cpp
+++ b/src/uscxml/server/HTTPServer.cpp
@@ -93,9 +93,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) {
- LOG(USCXML_INFO) << "HTTP server listening on tcp/" << _port;
+ LOGD(USCXML_INFO) << "HTTP server listening on tcp/" << _port;
} else {
- LOG(USCXML_ERROR) << "HTTP server cannot bind to tcp/" << _port;
+ LOGD(USCXML_ERROR) << "HTTP server cannot bind to tcp/" << _port;
}
}
@@ -103,9 +103,9 @@ HTTPServer::HTTPServer(unsigned short port, unsigned short wsPort, SSLConfig* ss
if (_wsPort > 0) {
_wsHandle = evws_bind_socket(_evws, _wsPort);
if (_wsHandle) {
- LOG(USCXML_INFO) << "WebSocket server listening on tcp/" << _wsPort;
+ LOGD(USCXML_INFO) << "WebSocket server listening on tcp/" << _wsPort;
} else {
- LOG(USCXML_ERROR) << "WebSocket server cannot bind to tcp/" << _wsPort;
+ LOGD(USCXML_ERROR) << "WebSocket server cannot bind to tcp/" << _wsPort;
}
}
@@ -462,7 +462,7 @@ void HTTPServer::processByMatchingServlet(const Request& request) {
matchesIter++;
}
- LOG(USCXML_INFO) << "Got an HTTP request at " << actualPath << " but no servlet is registered there or at a prefix";
+ LOGD(USCXML_INFO) << "Got an HTTP request at " << actualPath << " but no servlet is registered there or at a prefix";
evhttp_send_error(request.evhttpReq, 404, NULL);
}
@@ -505,7 +505,7 @@ void HTTPServer::replyCallback(evutil_socket_t fd, short what, void *arg) {
Reply* reply = (Reply*)arg;
if (reply->content.size() > 0 && reply->headers.find("Content-Type") == reply->headers.end()) {
- LOG(USCXML_INFO) << "Sending content without Content-Type header";
+ LOGD(USCXML_INFO) << "Sending content without Content-Type header";
}
std::map<std::string, std::string>::const_iterator headerIter = reply->headers.begin();
@@ -565,7 +565,7 @@ bool HTTPServer::registerServlet(const std::string& path, HTTPServlet* servlet)
HTTPServer* INSTANCE = getInstance();
if (!INSTANCE->_httpHandle) {
- LOG(USCXML_INFO) << "Registering at unstarted HTTP Server";
+ LOGD(USCXML_INFO) << "Registering at unstarted HTTP Server";
return true; // this is the culprit!
}
@@ -702,7 +702,7 @@ void HTTPServer::run(void* instance) {
while(INSTANCE->_isRunning) {
event_base_dispatch(INSTANCE->_base);
}
- LOG(USCXML_INFO) << "HTTP Server stopped";
+ LOGD(USCXML_INFO) << "HTTP Server stopped";
}
void HTTPServer::determineAddress() {