diff options
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..b90d5ed 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) << " " << req.url + << " " << res.code << ' ' << close_connection_; static std::string seperator = ": "; static std::string crlf = "\r\n"; |