[zeromq-dev] Logging format for sys://log transport
Andrew Hume
andrew at research.att.com
Tue Nov 16 19:24:07 CET 2010
i still think this is being clever, rather than just subscribing to the
level you want. for your case, just do two subscribes,
one of "\002" and one of "\003".
existing practice is for several levels (~7), and do we really want
to count that many out?
On Nov 16, 2010, at 11:19 AM, Pieter Hintjens wrote:
> Point is that subscription happens on a pure prefix of the topic key.
>
> -Pieter
>
> On 16 Nov 2010 19:01, "Erick Tryzelaar" <erick.tryzelaar at gmail.com>
> wrote:
> > On Mon, Nov 15, 2010 at 11:34 PM, Pieter Hintjens <ph at imatix.com>
> wrote:
> >> OK, /me found a real keyboard and can explain this better.
> >>
> >> Here's my proposal for the topic header:
> >>
> >> * Number of repeated characters indicates severity from 1 to 3 (X =
> >> information, XX = warning, XXX = error)
> >> * Character indicates category of error: '?' indicates internal 0MQ
> >> error, '*' indicates bad data, '#' indicates resource error, etc.
> >>
> >> Now I can subscribe to keys like '?' (any internal error),
> '***' (only
> >> serious bad data errors and up), '##' (any resource errors apart
> from
> >> informative). It is trivial to turn XXX into 3 if that's needed.
> >>
> >> This is just a sketch, we may want more severity levels eventually.
> >> I'd probably not use version numbers in the API since it would
> be very
> >> hard to manage multiple versions of the error subsystem at once.
> >>
> >> And we don't need multipart data, that is too complex. Just a
> topic
> >> that specifies the severity and category, and then a textual
> message,
> >> IMO. The simpler the better at this point.
> >
> > One potential downside with this approach is that it could make it
> > challenging to search for characters like '?'. You could get the
> same
> > functionality through http-style number status codes, where
> > informational messages are 1xx, client errors are 4xx, server errors
> > are 5xx. You can subscribe to all of the error codes by
> subscribing to
> > '4' and '5', or if you want just a specific message you subscribe to
> > '401'.
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
------------------
Andrew Hume (best -> Telework) +1 623-551-2845
andrew at research.att.com (Work) +1 none currently
AT&T Labs - Research; member of USENIX and LOPSA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101116/4dd34bdf/attachment.htm>
More information about the zeromq-dev
mailing list