@@ -20,7 +20,6 @@ server_base::server_base(const server_settings & settings, request_handler & use
20
20
timeout_ (20 ), // default read timeout in seconds
21
21
is_running (false ),
22
22
is_stopping (false ) {
23
- // _log.Log(LOG_STATUS, "[web:%s] create server_base using settings : %s", settings.listening_port.c_str(), settings.to_string().c_str());
24
23
if (!settings.is_enabled ()) {
25
24
throw std::invalid_argument (" cannot initialize a disabled server (listening port cannot be empty or 0)" );
26
25
}
@@ -99,7 +98,9 @@ void server_base::handle_stop() {
99
98
100
99
server::server (const server_settings & settings, request_handler & user_request_handler) :
101
100
server_base (settings, user_request_handler) {
102
- // _log.Log(LOG_STATUS, "[web:%s] create server using settings : %s", settings.listening_port.c_str(), settings.to_string().c_str());
101
+ #ifdef _DEBUG
102
+ _log.Log (LOG_STATUS, " [web:%s] create server using settings : %s" , settings.listening_port .c_str (), settings.to_string ().c_str ());
103
+ #endif
103
104
init (boost::bind (&server::init_connection, this ),
104
105
boost::bind (&server::handle_accept, this , _1));
105
106
}
@@ -132,7 +133,9 @@ ssl_server::ssl_server(const ssl_server_settings & ssl_settings, request_handler
132
133
settings_(ssl_settings),
133
134
context_(io_service_, ssl_settings.get_ssl_method())
134
135
{
135
- // _log.Log(LOG_STATUS, "[web:%s] create ssl_server using ssl_server_settings : %s", ssl_settings.listening_port.c_str(), ssl_settings.to_string().c_str());
136
+ #ifdef _DEBUG
137
+ _log.Log (LOG_STATUS, " [web:%s] create ssl_server using ssl_server_settings : %s" , ssl_settings.listening_port .c_str (), ssl_settings.to_string ().c_str ());
138
+ #endif
136
139
init (boost::bind (&ssl_server::init_connection, this ),
137
140
boost::bind (&ssl_server::handle_accept, this , _1));
138
141
}
@@ -142,13 +145,14 @@ ssl_server::ssl_server(const server_settings & settings, request_handler & user_
142
145
server_base(settings, user_request_handler),
143
146
settings_(dynamic_cast <ssl_server_settings const &>(settings)),
144
147
context_(io_service_, dynamic_cast <ssl_server_settings const &>(settings).get_ssl_method()) {
145
- // _log.Log(LOG_STATUS, "[web:%s] create ssl_server using server_settings : %s", settings.listening_port.c_str(), settings.to_string().c_str());
148
+ #ifdef _DEBUG
149
+ _log.Log (LOG_STATUS, " [web:%s] create ssl_server using server_settings : %s" , settings.listening_port .c_str (), settings.to_string ().c_str ());
150
+ #endif
146
151
init (boost::bind (&ssl_server::init_connection, this ),
147
152
boost::bind (&ssl_server::handle_accept, this , _1));
148
153
}
149
154
150
155
void ssl_server::init_connection () {
151
- // _log.Log(LOG_STATUS, "[web:%s] ssl_server::init_connection() : new connection using settings : %s", settings_.listening_port.c_str(), settings_.to_string().c_str());
152
156
153
157
new_connection_.reset (new connection (io_service_, connection_manager_, request_handler_, timeout_, context_));
154
158
@@ -202,7 +206,9 @@ void ssl_server::init_connection() {
202
206
(std::istreambuf_iterator<char >()));
203
207
if (content.find (" BEGIN DH PARAMETERS" ) != std::string::npos) {
204
208
context_.use_tmp_dh_file (settings_.tmp_dh_file_path );
205
- // _log.Log(LOG_STATUS, "[web:%s] 'BEGIN DH PARAMETERS' found in file %s", settings_.listening_port.c_str(), settings_.tmp_dh_file_path.c_str());
209
+ #ifdef _DEBUG
210
+ _log.Log (LOG_STATUS, " [web:%s] 'BEGIN DH PARAMETERS' found in file %s" , settings_.listening_port .c_str (), settings_.tmp_dh_file_path .c_str ());
211
+ #endif
206
212
} else {
207
213
_log.Log (LOG_ERROR, " [web:%s] missing SSL DH parameters from file %s" , settings_.listening_port .c_str (), settings_.tmp_dh_file_path .c_str ());
208
214
}
0 commit comments