21#include <google/protobuf/message.h>
25 TC_LOG_ERROR(
"service.protobuf",
"{} Server tried to call server method {}",
31 TC_LOG_DEBUG(
"service.protobuf",
"{} Server called client method {}({}{{ {} }})",
32 GetCallerInfo(), methodName, inputTypeName, request->ShortDebugString());
37 TC_LOG_DEBUG(
"service.protobuf",
"{} Client called server method {}({}{{ {} }}).",
38 GetCallerInfo(), methodName, inputTypeName, request->ShortDebugString());
43 TC_LOG_ERROR(
"service.protobuf",
"{} Client tried to call not implemented method {}({{ {} }})",
49 TC_LOG_ERROR(
"service.protobuf",
"Bad method id {}.", methodId);
59 return [token, methodId, methodName, outputDescriptor](
ServiceBase* service,
uint32 status, ::google::protobuf::Message
const* response)
61 ASSERT(response->GetDescriptor() == outputDescriptor);
62 TC_LOG_DEBUG(
"service.protobuf",
"{} Client called server method {}() {}{{ {} }} status {}.",
63 service->GetCallerInfo(), methodName, outputDescriptor->full_name(), response->ShortDebugString(), status);
65 service->SendResponse(service->GetServiceHash(), methodId, token, response);
67 service->SendResponse(service->GetServiceHash(), methodId, token, status);
#define TC_LOG_DEBUG(filterType__,...)
#define TC_LOG_ERROR(filterType__,...)
void LogInvalidMethod(uint32 methodId)
void LogDisallowedMethod(uint32 methodId)
void LogFailedParsingRequest(char const *methodName)
virtual std::string GetCallerInfo() const =0
void LogCallClientMethod(char const *methodName, char const *inputTypeName, google::protobuf::Message const *request)
std::function< void(ServiceBase *, uint32, ::google::protobuf::Message const *)> CreateServerContinuation(uint32 token, uint32 methodId, char const *methodName, google::protobuf::Descriptor const *outputDescriptor)
void LogUnimplementedServerMethod(char const *methodName, google::protobuf::Message const *request)
void LogCallServerMethod(char const *methodName, char const *inputTypeName, google::protobuf::Message const *request)