Skip to content

Commit

Permalink
fix remote logger remove ServerConfig::Context
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanshudong committed Jan 12, 2024
1 parent 4fdea5f commit e4c873f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions servant/libservant/RemoteLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ void RollWriteT::setDyeingLogInfo(const string &sApp, const string &sServer, con

LocalRollLogger::~LocalRollLogger()
{
for(auto e : _logger_ex)
terminate();

for(const auto& e : _logger_ex)
{
delete e.second;
}
Expand Down Expand Up @@ -518,7 +520,7 @@ void TimeWriteT::operator()(ostream &of, const deque<pair<size_t, string> > &buf
{
try
{
_logPrx->logger(DYEING_DIR, DYEING_FILE, "day", "%Y%m%d", vDyeingLog, ServerConfig::Context);
_logPrx->logger(DYEING_DIR, DYEING_FILE, "day", "%Y%m%d", vDyeingLog, _logPrx->tars_communicator()->getClientConfig().Context);
}
catch(exception &ex)
{
Expand Down
2 changes: 1 addition & 1 deletion servant/libservant/ServantHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ void ServantHandle::handleTarsProtocol(const CurrentPtr &current)

int ret = TARSSERVERUNKNOWNERR;

string sResultDesc = "";
string sResultDesc;

ResponsePacket response;

Expand Down
2 changes: 2 additions & 0 deletions servant/libservant/ServantProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -814,12 +814,14 @@ uint32_t ServantProxy::tars_gen_requestid()

void ServantProxy::tars_set_push_callback(const ServantProxyCallbackPtr & cb)
{
std::lock_guard<std::mutex> lock(_mutex);
_pushCallback = cb;
cb->setServantPrx(this);
}

ServantProxyCallbackPtr ServantProxy::tars_get_push_callback()
{
std::lock_guard<std::mutex> lock(_mutex);
return _pushCallback;
}

Expand Down
2 changes: 1 addition & 1 deletion servant/protocol

0 comments on commit e4c873f

Please sign in to comment.