Dev/algorithm config logging

I agree that this is not the best solution, but I am hoping for a
formalized logger framework ;-)
I'm open to any solution, but I don't want to spend too much time worrying
about this unless it is going to grow to be a problem.

Some options are:
1) Always print "log" messages (no #ifdef). This could grow to be annoying
if there is a lot of config activity or more "log" messages are added.
2) Add #ifdef to control logging. Makes the diagnostics a compile time
option, so some unexpected conditions may be missed, although it gives help
when developing a config and goes away when in production.
3) Defer this branch until a formalized logger framework is adopted, then
convert to use logger. This somewhat depends on how long until the logger
arrives.




On Thu, Jul 31, 2014 at 6:06 PM, Matt Leotta <notifications@github.com>
wrote:

> In maptk/core/algo/algorithm.txx:
>
> > @@ -190,13 +205,20 @@ algorithm_def<Self>
> >  {
> >    if(!config->has_value(name + config_block::block_sep + "type"))
> >    {
> > +    // \todo add log message DEBUG
> > +    std::cerr << "DEBUG - config block does not contain \""
>
> Does it make sense to use a different ifndef other than NDEBUG? It might
> be the case that you want to enable DEBUG logging even if you have not
> compiled for debugging. Or alternatively, maybe there could be a run time
> option somewhere? I suppose the latter is moving too much toward a
> formalized logger framework.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Kitware/maptk/pull/15/files#r15673012>.
>



-- 
*Linus Sherrill - *R&D Engineer
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065-8662
E: linus.sherrill@kitware.com
P: 518.881.4400