From c3b7aac1b7bd8593dcb8766fe732d74477890b2e Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Tue, 5 Sep 2017 11:46:55 -0400 Subject: [PATCH] Reduce api server logging rate --- src/lib/api/core/ApiClientInterop.cpp | 2 +- src/lib/api/core/ApiServerInterop.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/api/core/ApiClientInterop.cpp b/src/lib/api/core/ApiClientInterop.cpp index 9e8d56d16..6912522cc 100644 --- a/src/lib/api/core/ApiClientInterop.cpp +++ b/src/lib/api/core/ApiClientInterop.cpp @@ -128,7 +128,7 @@ CAPI void api_client_send(ApiClient* pclient, const char* buffer, int buffer_len pclient->rpc.wait_until_connected(1); LOG(Api,Diag,"send rpc {}",((int64_t)buffer)); pclient->rpc.send(std::move(request), [=](qbus::RPCError e, const qbus::RPCReplyPtr& reply) { - LOG(Api,Diag,"rpc reply {}",((int64_t)buffer)); + LOG(Api,Diag,"rpc reply {}",((int64_t)buffer)); switch (e) { case qbus::RPCError::RPC_OK: cb(reply->value().c_str(), reply->value().size(), extra); diff --git a/src/lib/api/core/ApiServerInterop.cpp b/src/lib/api/core/ApiServerInterop.cpp index aa39340c7..2c1ce4eba 100644 --- a/src/lib/api/core/ApiServerInterop.cpp +++ b/src/lib/api/core/ApiServerInterop.cpp @@ -33,7 +33,7 @@ BTS_EXPORT ApiServerCore* api_server_create(Quickbus* pbus, const char* type_nam return new ApiServerCore(*pbus, service_name, [=](qbus::RPCRequestPtr const& req, qbus::ReplyHandler const& reply) { // Extend the lifetime of the ReplyHandler by moving it to the heap qbus::ReplyHandler* phandler = new qbus::ReplyHandler(std::move(reply)); - LOG(Api,Info,"Received rpc request: {}",reinterpret_cast(phandler)); + LOG(Api,Diag,"Received rpc request: {}",reinterpret_cast(phandler)); cb((uint8_t*)(req->value().c_str()), req->value().size(), reinterpret_cast(phandler), extra); }); } @@ -41,7 +41,7 @@ BTS_EXPORT ApiServerCore* api_server_create(Quickbus* pbus, const char* type_nam BTS_EXPORT void api_server_call_callback(ReplyHandler** ppvhandler, const uint8_t* buffer, int length) { bts_assert(ppvhandler); bts_assert(*ppvhandler); - LOG(Api,Info,"Send rpc reply: {}",reinterpret_cast(*ppvhandler)); + LOG(Api,Diag,"Send rpc reply: {}",reinterpret_cast(*ppvhandler)); qbus::ReplyHandler** pphandler = reinterpret_cast(ppvhandler); std::string reply_buffer((const char*)buffer, length); qbus::RPCReplyPtr replyptr = std::make_shared(move(reply_buffer));