Boost logo

Boost :

From: Austin Bingham (abingham_at_[hidden])
Date: 2007-04-04 16:27:39


On 2007-04-04, Andrey Semashev <andysem_at_[hidden]> wrote:
> I see. I guess now I'm beginning to understand what channels are meant
> for. The channel appears to be yet another attribute which defines the
> "class" of the log record (i.e. an access log, debug trace, etc.).

I think channels are often thought of as a routing mechanism for log
messages. The message is passed to a channel which is connected to
filters, sinks, etc. The notion is, I believe, isomorphic to some systems
of tagging (in conjunction, again, with filters) that have been mentioned.
So yes, it's just another attribute that used to determine how/where the
message is formatted, written, and so forth.

> Seems to me we have to fix the set of mandatory attributes that every
> log record should always have and leave space for optional attributes
> (channels go here). I see these attributes as mandatory:
> - record number (increments for each record collected)
> - record date and time
> - thread name (if not set - thread id)
> - scope stack
> - severity level
> - message text

I think that defining a mandatory set of attributes is going to rub a
lot of users (me included) the wrong way. My sense is that we will be
better served by a system that let's you dynamically (and easily!)
associate attributes with a message. Moreover, it needs to be simple
to do that on a global or per entity (e.g. channel, sink, message)
basis. We could provide the kinds of formatters you describe with
the library as they have obvious general utility.

My main point, though, is that no mandated set of attributes will
please everyone and may well be a huge point of contention.

> As for optional attributes I think, it's better to leave them on
> user's behalf since it's too difficult to figure out the correct set
> of them and implement suitable interface to operate them in the
> unified and convenient way. But, surely, the library should leave an
> easy way to implement them.

I agree with this completely, except that (per above) it should apply
to all attributes :)

--
Austin Bingham
Signal & Information Sciences Laboratory
Applied Research Laboratories, University of Texas at Austin
10000 Burnet Rd., Austin, TX 78758
email:  abingham_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk