Afficher un message
Vieux 24/10/2007, 19h24   #8
jtorjo2007@yahoo.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Boost Logging Lib, v2 - added documentation

>
> I think that policy based design is something that most programmers
> are unfortunately not familiar with. I don't think it's hard to
> understand though. It just takes that initial effort. And it's not


As long as you provide reasonable defaults, this really should not be
an issue.
When someone wants to do advanced usage, fine, he'll learn more.
Otherwise, just use something predefined.

I think the best combination is to provide a generic lib, and provide
defaults for different "Usage scenarios" - that's what I've done:
http://torjo.com/log2/doc/html/common_scenarios.html

On a different note, I've made the lib much easier to use. So, to
define a logger using formatters/destinations, you can be happy with
the defaults:

typedef logger< use_format_write<formatter_base,destination_base> >
log_type;

The class use_format_write hides away most of the complexity behind
choosing policies. For instance:
http://torjo.com/log2/doc/html/commo...on_scenarios_3

> The problem with toast::log is that you can do anything you want.
> Thus it's impossible to document all the possibilities. The answer to


Just as a side-note - I don't see this as a disadvantage


--
http://John.Torjo.com -- C++ expert
.... call me only if you want things done right


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

  Réponse avec citation
 
Page generated in 0,05830 seconds with 9 queries