diff --git a/OSC/Source/OSC/Private/OscSettings.cpp b/OSC/Source/OSC/Private/OscSettings.cpp index 4a61050..e9e4be9 100644 --- a/OSC/Source/OSC/Private/OscSettings.cpp +++ b/OSC/Source/OSC/Private/OscSettings.cpp @@ -61,6 +61,7 @@ void UOscSettings::Send(const uint8 *buffer, int32 length, int32 targetIndex) SendImpl(&_sendSocket.Get(), buffer, length, *address.second); } +#if !NO_LOGGING // Log sent packet if(!LogOSC.IsSuppressed(ELogVerbosity::Verbose)) { @@ -69,11 +70,13 @@ void UOscSettings::Send(const uint8 *buffer, int32 length, int32 targetIndex) const auto encoded = FBase64::Encode(tmp); UE_LOG(LogOSC, Verbose, TEXT("SentAll: %s"), *encoded); } +#endif } else if(targetIndex < _sendAddresses.Num()) { SendImpl(&_sendSocket.Get(), buffer, length, *_sendAddresses[targetIndex].second); +#if !NO_LOGGING // Log sent packet if(!LogOSC.IsSuppressed(ELogVerbosity::Verbose)) { @@ -83,6 +86,7 @@ void UOscSettings::Send(const uint8 *buffer, int32 length, int32 targetIndex) const auto target = _sendAddresses[targetIndex].second->ToString(true); UE_LOG(LogOSC, Verbose, TEXT("SentTo %s: %s"), *target, *encoded); } +#endif } else { diff --git a/OSC/Source/OSC/Private/Receive/OscDispatcher.cpp b/OSC/Source/OSC/Private/Receive/OscDispatcher.cpp index a4471c9..0e80123 100644 --- a/OSC/Source/OSC/Private/Receive/OscDispatcher.cpp +++ b/OSC/Source/OSC/Private/Receive/OscDispatcher.cpp @@ -182,12 +182,14 @@ void UOscDispatcher::Callback(const FArrayReaderPtr& data, const FIPv4Endpoint&) ENamedThreads::GameThread); } +#if !NO_LOGGING // Log received packet if(!LogOSC.IsSuppressed(ELogVerbosity::Verbose)) { const auto encoded = FBase64::Encode(*data); UE_LOG(LogOSC, Verbose, TEXT("Received: %s"), *encoded); } +#endif } void UOscDispatcher::CallbackMainThread()