Skip to content

Commit

Permalink
Re-enable Zmq logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jonoomph committed Feb 18, 2021
1 parent 6cb842d commit 6012fc9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/ZmqLogger.cpp
Expand Up @@ -126,16 +126,16 @@ void ZmqLogger::Log(std::string message)
// Create a scoped lock, allowing only a single thread to run the following code at one time
const juce::GenericScopedLock<juce::CriticalSection> lock(loggerCriticalSection);

// // Send message over socket (ZeroMQ)
// zmq::message_t reply (message.length());
// std::memcpy (reply.data(), message.c_str(), message.length());
//
//#if ZMQ_VERSION > ZMQ_MAKE_VERSION(4, 3, 1)
// // Set flags for immediate delivery (new API)
// publisher->send(reply, zmq::send_flags::dontwait);
//#else
// publisher->send(reply);
//#endif
// Send message over socket (ZeroMQ)
zmq::message_t reply (message.length());
std::memcpy (reply.data(), message.c_str(), message.length());

#if ZMQ_VERSION > ZMQ_MAKE_VERSION(4, 3, 1)
// Set flags for immediate delivery (new API)
publisher->send(reply, zmq::send_flags::dontwait);
#else
publisher->send(reply);
#endif

// Also log to file, if open
LogToFile(message);
Expand Down

0 comments on commit 6012fc9

Please sign in to comment.