diff options
author | Antony Woods <acron1@gmail.com> | 2014-05-20 17:17:56 +0100 |
---|---|---|
committer | Antony Woods <acron1@gmail.com> | 2014-05-20 17:17:56 +0100 |
commit | dccb246cf8ba7b5480320088a817c29a4a7c8da3 (patch) | |
tree | c251f3ab13aaf3b8a5f76afe0d3ddd100db0c3b6 /http_connection.h | |
parent | 62ace917d325040bbf3015536d2ad3725b711c6d (diff) | |
download | crow-dccb246cf8ba7b5480320088a817c29a4a7c8da3.tar.gz crow-dccb246cf8ba7b5480320088a817c29a4a7c8da3.zip |
Added primitive logging
Diffstat (limited to 'http_connection.h')
-rw-r--r-- | http_connection.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/http_connection.h b/http_connection.h index b995523..7dc32e1 100644 --- a/http_connection.h +++ b/http_connection.h @@ -11,6 +11,7 @@ #include "datetime.h" #include "parser.h" #include "http_response.h" +#include "logging.h" namespace crow { @@ -73,11 +74,9 @@ namespace crow res = handler_->handle(req); -#ifdef CROW_ENABLE_LOGGING - std::cerr << "HTTP/" << parser_.http_major << "." << parser_.http_minor << ' '; - std::cerr << method_name(req.method); - std::cerr << " " << res.code << ' ' <<close_connection_<<std::endl; -#endif + CROW_LOG_INFO << "HTTP/" << parser_.http_major << "." << parser_.http_minor << ' ' + << method_name(req.method) + << " " << res.code << ' ' << close_connection_; static std::string seperator = ": "; static std::string crlf = "\r\n"; |