Skip to content

Commit

Permalink
DEVOPS-10175 remove logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ipalenov committed Jun 13, 2024
1 parent 062b076 commit 8043af3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/RabbitMQClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ void RabbitMQClient::basicConsumeImpl(Biterp::CallContext& ctx) {
result = tag;
LOGI("Consumer created " + tag);
{
std::lock_guard<std::mutex> lock(_mutex);
consumers.push_back(tag);
consumerError.clear();
// std::lock_guard<std::mutex> lock(_mutex);
// consumers.push_back(tag);
// consumerError.clear();
}
connection->loopbreak();
})
Expand Down Expand Up @@ -310,10 +310,10 @@ void RabbitMQClient::basicConsumeImpl(Biterp::CallContext& ctx) {
})
.onCancelled([this](const std::string &consumer){
LOGI("Consumer cancelled " + consumer);
std::lock_guard<std::mutex> lock(_mutex);
consumers.erase(std::remove_if(consumers.begin(), consumers.end(), [&consumer](std::string& s){return s == consumer;}));
// std::lock_guard<std::mutex> lock(_mutex);
// consumers.erase(std::remove_if(consumers.begin(), consumers.end(), [&consumer](std::string& s){return s == consumer;}));
})
.onError([this, &result](const char* message)
.onError([this, result](const char* message)
{
std::lock_guard<std::mutex> lock(_mutex);
consumerError = message;
Expand Down Expand Up @@ -344,9 +344,9 @@ void RabbitMQClient::basicConsumeMessageImpl(Biterp::CallContext& ctx) {
{
std::unique_lock<std::mutex> lock(_mutex);
if (messageQueue.empty()){
if (!consumerError.empty()){
throw Biterp::Error(consumerError);
}
// if (!consumerError.empty()){
// throw Biterp::Error(consumerError);
// }
if (!cvDataArrived.wait_for(lock, std::chrono::milliseconds(timeout), [&] { return !messageQueue.empty(); })) {
ctx.setBoolResult(false);
return;
Expand Down
1 change: 1 addition & 0 deletions src/addin/biterp/Logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ namespace Biterp {
}

inline static void log(int level, const std::string &text, const Logger& logger) {
return;
instance()._log(level, text, logger);
}

Expand Down

0 comments on commit 8043af3

Please sign in to comment.