
On Thu, Oct 29, 2009 at 6:19 AM, JD <jean.daniel.michaud@gmail.com> wrote:
On Oct 28, 9:51 pm, Emil Dotchevski <emildotchev...@gmail.com> wrote:
On Wed, Oct 28, 2009 at 12:14 PM, JD <jean.daniel.mich...@gmail.com> wrote:
It's been a while since a discussion about logging hasn't ran on the boost mailing list. I have a small logging library implementing some of the requirements that were previously deemed desirable during the discussion we had here a couple of years ago.
What is the rationale for attaching semantics to messages (log, warning, error, etc.)? I'm assuming the logging library isn't going to take action -- such as terminate the program in case of a fatal error -- so why not just define severity level?
I'm using semantics to satisfy the 2 requirements below : 7. Configurable log message attributes 9. Filtering support
Unless there is a use case for non-exclusive semantics (like needing to classify a logged message as both error and warning), I think it would be simpler to use different targets for messages depending on whether they are a warning or an error: WARN << "A warning"; ERR << "An error"; (sort of like std::cout vs. std::cerr) Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode