[PATCH] debug: Print header when logging to stdout
Michael Adam
obnox at samba.org
Tue Dec 9 09:23:54 MST 2014
reviewed-by me.
Has noone pushed it or have there been problems with autobuild?
I will try to autobuild/push later.
Michael
On 2014-11-21 at 14:52 -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?
>
> Christof
> From c3f9fcde891dcfb41468292d99f6ee112c149d6c Mon Sep 17 00:00:00 2001
> From: Christof Schmitt <cs at samba.org>
> Date: Fri, 21 Nov 2014 14:44:38 -0700
> Subject: [PATCH] debug: Print header when logging to stdout
>
> Having the source line of the error messages helps debugging interactive
> commands.
>
> Signed-off-by: Christof Schmitt <cs at samba.org>
> ---
> lib/util/debug.c | 5 -----
> 1 files changed, 0 insertions(+), 5 deletions(-)
>
> diff --git a/lib/util/debug.c b/lib/util/debug.c
> index 750ad25..31a203b 100644
> --- a/lib/util/debug.c
> +++ b/lib/util/debug.c
> @@ -969,11 +969,6 @@ bool dbghdrclass(int level, int cls, const char *location, const char *func)
> /* Set current_msg_level. */
> current_msg_level = level;
>
> - /* Don't print a header if we're logging to stdout. */
> - if ( state.logtype != DEBUG_FILE ) {
> - return( true );
> - }
> -
> /* Print the header if timestamps are turned on. If parameters are
> * not yet loaded, then default to timestamps on.
> */
> --
> 1.7.1
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20141209/fdc9c0fd/attachment.pgp>
More information about the samba-technical
mailing list