[PATCHES] Logging to multiple debug backends
cs at samba.org
Wed Mar 18 08:56:22 MDT 2015
On Wed, Mar 18, 2015 at 06:36:34AM +0100, Volker Lendecke wrote:
> On Tue, Mar 17, 2015 at 04:58:23PM -0700, Christof Schmitt wrote:
> > On Tue, Mar 17, 2015 at 04:30:53PM -0700, Jeremy Allison wrote:
> > > On Tue, Mar 17, 2015 at 04:27:05PM -0700, Christof Schmitt wrote:
> > > >
> > > > I assume that you are trying to get the code ready for moving some of
> > > > the ctdb logging backends. Since this is only an API internal to
> > > > debug.c, we can change that anytime. I would propose that we agree on a
> > > > format used in the 'logging' parameter for passing additional options,
> > > > and make sure that we don't need to change that format going forward.
> > > > Then we could work towards getting the current patch set in master.
> > > >
> > > > Moving the ctdb logging backends can be done later. As the required
> > > > changes are only internal to debug.c, we can do that at any time.
> > > >
> > > > Does this sound like a plan?
> > >
> > > Sorry, I've completely lost the plot on this patchset now :-).
> > >
> > > Do you have a completed patchset you'd like reviewing ?
> > It is only one patchset:
> > https://lists.samba.org/archive/samba-technical/2015-March/106224.html
> > The only pending change is changing the token syntax in the logging
> > parameter, as discussed with Martin, from
> > name[:level]
> > to
> > name[:option][@level]
> > The logging config would then look like:
> > logging = syslog at 1 file at 5 lttng at 10
> > The :option part would be ignored at the moment, but once we look into
> > moving some logging code from ctdb under this backend framework, the
> > backends from ctdb will use the option field.
> > I will add the change probably tomorrow and resubmit the patchset.
> How would the different debug classes look like?
I am not quite sure what you are referring to. The idea is to keep the
backends independent of debug classes. The backend 'logging' parameter
basically replaces 'syslog' and 'syslog only' while allowing different
configurations, and the backend code just looks at the log level of each
message, not the debug class.
In case you are referring about debug classes that ctdb could use, once
ctdb makes more use of the debug code: The first idea would be
introducing a debug class like DBGC_CTDB, but that has to be discussed
in more detail once we come closer to working on that.
More information about the samba-technical