Is there any interest in a library which provides an extensible logging facility?

The library would provide the ability to route a message, with an arbitary severity, to any amount of "sinks". The library would support any amount of loggers, identifiable by a unique name (std::string), so that the exact same logger would always be returned for a certain name. Sinks would be defined by deriving from an abstract Sink class. The library would provide a couple of premade sinks (file sink, console sink; ideas welcome). Any given logging message will use a derived class of an abstract Severity class to denote its severity. The library would provide some (8 or so) premade Severity subclasses. Possible syntax would be something like this: In some header file: FileSink fs("log.txt"); LOGGER("My Logger").tie(fs); In some source file: LOGGER << Warning << "Testing logger" << 42 << 3.4 << 'a' << endl; LOGGER(name) would be defined as something like Logger::instance(name, __LINE__, __FILE__) In addition, there would be a way to specify output formatting on a per-logger basis, ideas for possible syntax very welcome (maybe a printf-like syntax?) Any input is appreciated.

On 10/3/05, Genia Bezman <genia4@gmail.com> wrote:
The library would provide the ability to route a message, with an arbitary severity, to any amount of "sinks". The library would support any amount of loggers, identifiable by a unique name (std::string), so that the exact same logger would always be returned for a certain name.
John Torjo is working on a library that does more or less just this. Its is in the Review queue and is available from his home page at http://www.torjo.com/ -- Caleb Epstein caleb dot epstein at gmail dot com
participants (2)
-
Caleb Epstein
-
Genia Bezman