debug prints
Andrew Bartlett
abartlet at samba.org
Tue Aug 7 20:44:26 MDT 2012
On Tue, 2012-08-07 at 16:11 -0700, Herb Lewis wrote:
> There was some discussion a while back about always including the
> function name in the
> debug header. I'd like to propose the following patch. It does 2 things.
> It adds printing
> "func" value passed to the dbghdrclass function in all 3 cases - no
> timestamp, normal
> timestamp and debug prefix timestamp. It also changes dbghdrclass to use
> dbgtext
> instead of Debug1 so the whole line is printed at the same time. This
> prevents log.smbd
> from having many garbled lines when there is heavy traffic.
>
> Of course when this patch is applied we need to clean up all the DEBUG
> statements to
> not print the (many times incorrect) function name.
Additionally in the same function, we should get rid of:
/* Don't print a header if we're logging to stdout. */
if ( state.logtype != DEBUG_FILE ) {
return( true );
}
That is, always print it, even when logging to stdout. This will assist
the --foreground case we use with s3fs, and client utilities. if this
makes a 'user message' ugly, then we should change that output to go via
d_printf(), and not DEBUG().
Thanks for chasing this up.
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
More information about the samba-technical
mailing list