Skip to content

Commit

Permalink
Added log output of RPC request and response
Browse files Browse the repository at this point in the history
  • Loading branch information
EDDragonWolf committed Feb 21, 2018
1 parent 628fb14 commit aaff33b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/supernode/DAPI_RPC_Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ bool supernode::DAPI_RPC_Server::handle_http_request(const epee::net_utils::http

bool supernode::DAPI_RPC_Server::HandleRequest(const epee::net_utils::http::http_request_info& query_info, epee::net_utils::http::http_response_info& response_info, connection_context& m_conn_context) {
if( query_info.m_URI!=rpc_command::DAPI_URI ) return false;

LOG_PRINT_L0(query_info.m_body);
uint64_t ticks = epee::misc_utils::get_tick_count();
epee::serialization::portable_storage ps;

Expand Down Expand Up @@ -106,6 +106,7 @@ bool supernode::DAPI_RPC_Server::HandleRequest(const epee::net_utils::http::http
break;
}
}
LOG_PRINT_L0(response_info.m_body);

if(!handler) { LOG_PRINT_L4("handler not found for: "<<callback_name); return false; }
if( !handler->Process(ps, response_info.m_body) ) { LOG_PRINT_L4("Fail to process (ret false): "<<callback_name); return false; }
Expand Down

0 comments on commit aaff33b

Please sign in to comment.