[zeromq-dev] Logging format for sys://log transport

Mikko Koppanen mikko.koppanen at gmail.com
Mon Nov 15 22:40:09 CET 2010

On Mon, Nov 15, 2010 at 8:57 PM, Andrew Hume <andrew at research.att.com> wrote:
> unless you think you need something quite different,
> just follow existing practice, e.g. syslog.
> that is, a type (== facility) and an impact (==severity==priority).
> so i would lay it out as
> byte 0 == impact
> byte 1 == type
> remaining bytes are UTF-8 encoding of message.
> don't use multi-part (i suspect most people don't handle multi-part); it
> seems way overkill.

This seems like a sensible approach. It still allows filtering using a
topic prefix if first bytes are impact and type.

> i agree with martin; differentiate between logging and performance stuff
> by the bind address. in fact, we could use this to distinguish versions;
> for example, the first format could be "sys:/log0", and the next version
> can be "sys:/log1" and so on. this way we won't need to manage migration.
> keep it simple until we see a distinct need for something more complicated.

I think separating between logging and performance stuff in the bind
address makes sense, or even give sockopt to allow user to set the
bind addresses. This would allow separating the events from multiple

Maybe a sensible approach would be to have two (or more) unused bytes
after impact and type so that the protocol can be extended later
without affecting backwards compatibility. This way people don't need
to change the transport to accommodate for changes in the logging

Mikko Koppanen

More information about the zeromq-dev mailing list