From: Austin Bingham (abingham_at_[hidden])
Date: 2007-04-03 16:59:09
On 2007-04-03, Andrey Semashev <andysem_at_[hidden]> wrote:
> One thing that isn't clear for me now is the way the library should be
> initialized. Obviously, in most industrial-sized use cases the
> initialization should be made from an external source (e.g. a file
> with settings, system registry, etc.), but in a small-sized solutions
> either no or minimum initialization may be done right from code. The
> problem here is that I see no unified way to init the lib the first
> way. For some cases a simple text file would be sufficient, for others
> the settings should be in XML, for third ones they should be obtained
> not from the file at all. Therefore for now I can only think of a direct
> initialization from code. Any other suggestions/opinions?
I tend to think that the notion of an "official" configuration mechanism
is of secondary importance at best, and a red-herring at worst.
In the end, the logging system will be configurable via its
programmatic interface, and spending too much time thinking about some
configuration text file format (or whatever) will only serve to
constrain our thinking on the important stuff.
Given some programmatic interface (say, the ability to define channels,
filter levels, sinks, etc.), I can define any number of mappings from
file formats to operations on the library's interface. So, I could
have code that configures my logging based on registry information,
some XML file, the current headline on slashdot, or any combination
thereof, but that should have no impact on how we design the interface
in the first place. My point, I guess, is that we should probably
not get too wrapped up in that kind of detail right now.
That said, I think any final version of a logging library should
include at least an example of a configuration file system, one that
meets some sort of "generally useful" criterium. It's something that
people seem to want.
-- Austin Bingham Signal & Information Sciences Laboratory Applied Research Laboratories, University of Texas at Austin 10000 Burnet Rd., Austin, TX 78758 email: abingham_at_[hidden] cell: (512) 799-2444 office: (512) 835-3832
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk