Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SilKit/IntegrationTests/ITest_SingleParticipant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class ITest_SingleParticipant : public testing::Test
expectedData.resize(message.expectedData.size());
std::copy(message.expectedData.begin(), message.expectedData.end(), expectedData.begin());

CanFrame msg;
CanFrame msg{};
msg.canId = 1;
msg.dataField = expectedData;
msg.dlc = static_cast<uint16_t>(msg.dataField.size());
Expand Down
2 changes: 1 addition & 1 deletion SilKit/IntegrationTests/ITest_ThreeCanController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class ITest_ThreeCanController : public testing::Test
expectedData.resize(message.expectedData.size());
std::copy(message.expectedData.begin(), message.expectedData.end(), expectedData.begin());

CanFrame msg;
CanFrame msg{};
msg.canId = 1;
msg.dataField = expectedData;
msg.dlc = static_cast<uint16_t>(msg.dataField.size());
Expand Down
10 changes: 9 additions & 1 deletion SilKit/source/services/logging/MessageTracing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,15 @@ void TraceMessageCommon(Logging::ILoggerInternal* logger,
std::string_view keyString = {},
std::string_view valueString = {})
{

if constexpr (std::is_same_v<SilKitMessageT, SilKit::Services::Logging::LogMsg>)
{
// Don't trace LogMessages - this could cause cycles!
SILKIT_UNUSED_ARG(logger);
SILKIT_UNUSED_ARG(messageString);
SILKIT_UNUSED_ARG(addr);
SILKIT_UNUSED_ARG(msg);
SILKIT_UNUSED_ARG(keyString);
SILKIT_UNUSED_ARG(valueString);
return;
}
else
Expand Down Expand Up @@ -58,7 +63,9 @@ void TraceMessageCommon(Logging::ILoggerInternal* logger,
}
}
}

} // namespace Detail

template <class SilKitMessageT>
void TraceRx(Logging::ILoggerInternal* logger, const Core::IServiceEndpoint* addr, const SilKitMessageT& msg,
const Core::ServiceDescriptor& from)
Expand All @@ -77,5 +84,6 @@ void TraceTx(Logging::ILoggerInternal* logger, const Core::IServiceEndpoint* add
{
Detail::TraceMessageCommon(logger, "Send targetted message", addr, msg, Logging::Keys::to, target);
}

} // namespace Services
} // namespace SilKit
Loading