zeromq / zyre

Zyre - an open-source framework for proximity-based peer-to-peer applications
Mozilla Public License 2.0
870 stars 172 forks source link

how to supress error message spam #708

Closed cowratt closed 2 years ago

cowratt commented 2 years ago

Hi, I have a zyre (czmq) node running in the background of one of my programs. Every time that the network is unplugged, I get a zmq error messages along the lines of: zbeacon: failed to transmit, attempting reconnection. reason=invalid socket printing to the console every second. Is there a way to supress error messages?

Thanks

sphaero commented 2 years ago

If the network is unplugged the error is logical. But echoing it every second might not be needed...

The error comes from zbeacob.c in czmq: https://github.com/zeromq/czmq/blob/d07776250b5bb57f52802800191dc25dea79627a/src/zbeacon.c#L578

If you can you can suggest a fix for this through a pull request. Otherwise file an issue at czmq?

sphaero commented 2 years ago

ow crap I just saw it was already moved to czmq :)

cowratt commented 2 years ago

Got it! zsys_set_logstream (NULL);