On Thursday 17, Pieter Hintjens wrote:
> On Thu, Feb 17, 2011 at 5:29 PM, Martin Sustrik <[email protected]> wrote:
> > One more thing I've noticed: The identities won't be part of most log
> > records, so identity should not be part of log() prototype. Instead it
> > should be formatted and placed into the log message by session.cpp.
> 
> That was the first design but the same would need to go into xrep.cpp,
> and it's ugly to duplicate this code. Like I said, it needs some
> rework, that formatting should go in some other method perhaps.

What about allowing the log messages to be multi-part, with the identity (or 
other optional log info) sent unformatted as the second part.  This could also 
decrease the overhead of sending log messages.

Also if the first part of the log message was just the error identifier, then 
a log formatting function could be provided to format the log message for 
printing.

This logging feature could be used for detecting connect/disconnect events, 
something that I and a few other people I talked to have wanted.

Another way to get event notices from a socket would be to add a socket option 
to set an address that events should be published to.

connect/disconnect events could be used by publishers to know when they should 
start/stop sending data or by load-balancers devices to detect the failure of 
backend workers.

-- 
Robert G. Jakabosky
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to