Boost logo

Boost Users :

Subject: Re: [Boost-users] boost logger architecture.
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2014-09-24 18:35:58


IMO this is a very philosophical question, that you ask here. But I really
agree with the author. Making any detail of the design extensible will make
the whole interface very bold. There is an interface: sink, which defines
how to extend logger. You can write your sink, if you need to copy an
existing sink it, well that's not so cool...

On Tue, Sep 23, 2014 at 5:05 PM, Savva Kuznetsov <
Savva.Kuznetsov_at_[hidden]> wrote:

> Hello, guys.
>
>
>
> This post is almost the entire duplicate of my Ticket #10524.
>
>
>
> We're using boost logger in our application and it's really great boost
> library part. But, we need to change some of it's functionality. Actually,
> we need to add some lines of code in a method of collector class (for
> example, file_collector from boost\log\sinks\text_file_backend.cpp)
>
>
>
> I guess the right way to do this is inheritance from file_collector class
> and redefinition of it’s members functions. But, since it's entire
> declaration and definition are in text_file_backend.cpp file in an
> anonymous namespace, it's impossible. Also, it would be cool to use some
> functions that this class uses (these functions are in
> text_file_backend.cpp file too for some unknown reason).
>
>
>
> The only solution I see is to copy-and-paste the entire file_collector
> class code from boost\log\sinks\text_file_backend.cpp and rewrite some of
> it's methods content, but, it’s obviously wrong and not beautiful way (not
> boost-way). I guess boost must provide an extensible way to do things. Is
> there any reason that the entire class is in text_file_backend.cpp file or
> maybe I am missing something?
>
>
>
> My ticket have been closed by the author of logger with the comment: “file_collector
> in text_file_backend.cpp is not designed to be extensible because the
> interface for the extension is not clear. This made the implementation
> simpler.”
>
>
>
> It’s kinda strange reason, is it?
>
>
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net