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_server.h | |
parent | 62ace917d325040bbf3015536d2ad3725b711c6d (diff) | |
download | crow-dccb246cf8ba7b5480320088a817c29a4a7c8da3.tar.gz crow-dccb246cf8ba7b5480320088a817c29a4a7c8da3.zip |
Added primitive logging
Diffstat (limited to 'http_server.h')
-rw-r--r-- | http_server.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/http_server.h b/http_server.h index 387f2e5..7d76c84 100644 --- a/http_server.h +++ b/http_server.h @@ -6,9 +6,7 @@ #include "http_connection.h" #include "datetime.h" - -// TEST -#include <iostream> +#include "logging.h" namespace crow { @@ -23,7 +21,8 @@ namespace crow socket_(io_service_), signals_(io_service_, SIGINT, SIGTERM), handler_(handler), - concurrency_(concurrency) + concurrency_(concurrency), + port_(port) { do_accept(); } @@ -36,6 +35,8 @@ namespace crow std::async(std::launch::async, [this]{io_service_.run();}) ); + CROW_LOG_INFO << "Server is running, local port " << port_; + signals_.async_wait( [&](const boost::system::error_code& error, int signal_number){ io_service_.stop(); @@ -70,5 +71,6 @@ namespace crow uint16_t concurrency_ = {1}; std::string server_name_ = "Crow/0.1"; + uint16_t port_; }; } |