Skip to content

Commit f8225c8

Browse files
committed
Log message splitted in several messages to avoid cut off.
1 parent 5907ff6 commit f8225c8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/MqttService/src/MqttBrokerConnection.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,14 +312,18 @@ void MqttBrokerConnection::disconnectedState()
312312
/* Authentication necessary? */
313313
if (false == m_user.isEmpty())
314314
{
315-
LOG_INFO("Connect to %s:%u as %s with %s.", m_url.c_str(), m_port, m_user.c_str(), m_clientId.c_str());
315+
LOG_INFO("Connect to %s:%u", m_url.c_str(), m_port);
316+
LOG_INFO("User : %s", m_user.c_str());
317+
LOG_INFO("Client id: %s", m_clientId.c_str());
316318

317319
isConnected = m_mqttClient.connect(m_clientId.c_str(), m_user.c_str(), m_password.c_str(), m_willTopic.c_str(), 0, true, m_lastWillPayload.c_str());
318320
}
319321
/* Connect anonymous */
320322
else
321323
{
322-
LOG_INFO("Connect anonymous to %s:%u with %s.", m_url.c_str(), m_port, m_clientId.c_str());
324+
LOG_INFO("Connect to %s:%u", m_url.c_str(), m_port);
325+
LOG_INFO("User : <anonymous>");
326+
LOG_INFO("Client id: %s", m_clientId.c_str());
323327

324328
isConnected = m_mqttClient.connect(m_clientId.c_str(), nullptr, nullptr, m_willTopic.c_str(), 0, true, m_lastWillPayload.c_str());
325329
}

0 commit comments

Comments
 (0)