Skip to content

Commit ce2eaca

Browse files
committed
mqtt: {} for LOG_x
1 parent e240597 commit ce2eaca

4 files changed

Lines changed: 12 additions & 0 deletions

File tree

mqtt_streaming_client_module/src/mqtt_base_fb.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ void MqttBaseFb::subscribeToTopics()
5252
bool success = true;
5353
auto lambda = [this](const mqtt::MqttAsyncClient &client, mqtt::MqttMessage &msg){this->onSignalsMessage(client, msg);};
5454
if (!getSubscribedTopics().empty())
55+
{
5556
LOG_I("Trying to subscribe to the topics");
57+
}
5658
for (const auto& topic : getSubscribedTopics())
5759
{
5860
subscriber->setMessageArrivedCb(topic, lambda);

mqtt_streaming_client_module/src/mqtt_json_receiver_fb_impl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ void MqttJsonReceiverFbImpl::createSignals()
8181
{
8282
auto lock = std::scoped_lock<std::mutex>(sync);
8383
if (!subscribedSignals.empty())
84+
{
8485
LOG_I("Creating signals...");
86+
}
8587

8688
for (const auto& signalId : signalIdList)
8789
{

mqtt_streaming_client_module/src/mqtt_raw_receiver_fb_impl.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ void MqttRawReceiverFbImpl::readProperties()
4343
{
4444
isPresent = true;
4545
if (prop.getCount() != 0)
46+
{
4647
LOG_I("Topics in the list:");
48+
}
4749
for (const auto& topic : prop)
4850
{
4951
auto topicStr = topic.asPtr<IString>();
@@ -86,7 +88,9 @@ void MqttRawReceiverFbImpl::createSignals()
8688
{
8789
auto lock = std::scoped_lock<std::mutex>(sync);
8890
if (!topicsForSubscribing.empty())
91+
{
8992
LOG_I("Creating signals...");
93+
}
9094
for (const auto& topic : topicsForSubscribing)
9195
{
9296
LOG_D("\tfor the topic: {}", topic);

mqtt_streaming_protocol/src/MqttDataWrapper.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ bool MqttDataWrapper::validateTopic(const daq::StringPtr topic, const daq::Logge
128128
if (!topic.assigned() || topic.getLength() == 0)
129129
{
130130
if (loggerComponent.assigned())
131+
{
131132
LOG_W("Empty topic is not allowed!");
133+
}
132134
return false;
133135
}
134136

@@ -140,7 +142,9 @@ bool MqttDataWrapper::validateTopic(const daq::StringPtr topic, const daq::Logge
140142
if (part == "#" || part == "+")
141143
{
142144
if (loggerComponent.assigned())
145+
{
143146
LOG_W("Wildcard characters '+' and '#' are not allowed in topic: {}", topic.toStdString());
147+
}
144148
return false;
145149
}
146150
}

0 commit comments

Comments
 (0)