Samba DEBUG in OpenChange

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Dec 3 19:19:11 UTC 2015


On Thu, Dec 03, 2015 at 06:08:15PM +0000, Jelmer Vernooij wrote:
> [+cc devel at lists.openchange.org]
> 
> On Thu, Dec 03, 2015 at 01:43:52PM +0100, Volker Lendecke wrote:
> > Julien, a few months ago we spoke about the use of Samba's
> > DEBUG in OpenChange. On your website you state that
> > OpenChange is designed for exactly Samba 4.1.18, I'm
> > guessing that the DEBUG issue is one of the reasons for
> > that. 4.1.18 starts to smell, given that within the 4.1
> > series it has been superseded by 3 releases and it's EOL
> > date is on the horizon.
> > 
> > When reading doc/developer/logging.txt in your tree I get
> > the impression that the whole issue could be solved by
> > either extending our debug backends (see lib/util/debug.c)
> > with an OpenChange-specific mechanism. This would interely
> > be possible, we have a whole bunch of highly specific
> > backends like LTTNG and GPFS. OpenChange wouldn't make a
> > difference.
> > 
> > If you don't want to extend debug.c, you might also use the
> > debug_set_callback() function and redirect the Samba RPC/NDR
> > debugs into your own mechanism in line.
> > 
> > How can we go forward here?
> 
> We've currently only finished stage (0),
> documented in doc/developer/logging.txt.
> 
> This means that there are three steps still remaining:
> 
>  * having pidl avoid calls to DEBUG() but to something that is public
> 
>  * redirect DCE/RPC log output related to OpenChange to the
>    openchange logging. We don't want to redirect *all* output from
>    Samba (as OpenChange gets loaded into the daemon binary), just that
>    related to the OpenChange DCE/RPC interfaces.

Can't you solve that with debug classes? debug.c is pretty
flexible these days.

>  * having oc_log.c actually write to a OpenChange-specific log file,
>    rather than simply calling DEBUG().

That should be simple, right?

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de



More information about the samba-technical mailing list