[PATCHES] Logging to multiple debug backends

Martin Schwenke martin at meltin.net
Tue Mar 17 04:06:52 MDT 2015


On Tue, 17 Mar 2015 10:31:41 +0100, Volker Lendecke
<Volker.Lendecke at SerNet.DE> wrote:

> On Mon, Mar 16, 2015 at 01:54:26PM -0700, Christof Schmitt wrote:
> > I started implementing a separate array, see the attached patch. So far
> > it compiles, but it is untested. Does that fit your idea?
> 
> Ooops. Sorry, I did not mean this as a serious suggestion. I
> really doubt we will ever see this in profiles, because most
> of the filtering load is already done in the DEBUG macro. We
> only end up here if we have something to print, and any
> snprintf load or even write(2) calls will completely
> overwhelm this. If at one point we have dozens of backends
> compiled in, we will need to do something, but I think a
> typical configuration will have at most 4 compiled in at
> all.
> 
> I would rather have liked Martin to squash my arguments :-)

Yeah, yeah...  :-)

After I sent that email I did actually think about the locality of
reference issue with a linked list.  However, I wanted to see what
others thought.  When you replied I did think it was potential
over-engineering and whether we'd see any benefit.  :-)

Sorry, Christof... I also didn't mean to waste your time.  :-(

One thing the linked list gives you is some help in simplifying the
struct and API as I suggested.  There are various hacks I can think of
but none of them are elegant.

I still think the changes in the other 1/2 of the thread (ability to
pass options, changing API) are worthwhile.  I'll try to reply to that
soon...  and come up with something pretty for the API/struct thing.

peace & happiness,
martin


More information about the samba-technical mailing list