[PATCH] debug: Print header when logging to stdout
Christof Schmitt
cs at samba.org
Thu Dec 11 15:39:57 MST 2014
On Sat, Dec 06, 2014 at 06:20:23PM +0100, Volker Lendecke wrote:
> On Fri, Dec 05, 2014 at 06:42:18PM +0100, David Disseldorp wrote:
> > On Fri, 21 Nov 2014 14:52:16 -0700, Christof Schmitt wrote:
> >
> > > This patch changes the debug code, so that the header is always printed.
> > > I find this useful for debugging interactive commands with -d10. Always
> > > having the debug header in the output would also make the explicit
> > > function name in the debug message obsolete.
> > >
> > > I assume that there is a historical reason for the behavior in the debug
> > > code; does anybody know why the debug code behaves differently for
> > > stdout and logging to a file?
> >
> > I'll be really happy to see this change go in.
> >
> > Reviewed-by: David Disseldorp <ddiss at samba.org>
> >
> > Once it's in, we should be able to finally ban people from putting
> > explicit function names in debug messages :)
>
> Well, with %s and __func__ it's not *that* bad anymore.
If we end up adding %s __func__ to every call of DEBUG, then that part
should be at least part of the DEBUG macro to avoid the duplicated code.
Christof
More information about the samba-technical
mailing list