[PATCH] debug: Print header when logging to stdout

Andrew Bartlett abartlet at samba.org
Fri Dec 5 10:35:25 MST 2014


On Fri, 2014-12-05 at 15:39 +0100, Andreas Schneider wrote:
> On Friday 21 November 2014 14:52:16 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 would also like to have the debug header in stdout logging. So you have at 
> least my +1. But others should comment too.

Years ago, DEBUG() was used in interactive programs for communication,
not just output.  But that doesn't translate etc, so d_printf() et al
was done.  My hunch is that this is the origin, and I'll be glad to see
it go away.

I thought we tried this once before, only to have it die a horrible
death in autobuild.  Either way, Reviewed-by: Andrew Bartlett
<abartlet at samba.org> and I or someone else can autobuild it if there are
no further objections. 

We were going to follow this up with removing many of the wrong
location/function prefixes. 

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




More information about the samba-technical mailing list