log level = 10 imply "debug pid = yes", "debug uid = yes" and "debug class = yes"

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Nov 15 23:44:24 MST 2011


On Tue, Nov 15, 2011 at 10:01:46PM +0100, Stefan (metze) Metzmacher wrote:
> Hi,
> 
> are there any objections regarding this patch:
> https://gitweb.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=03c698efd615ffe248870db84b4d1f880ce4d72c
> 
> It lets "log level = 10" imply "debug pid = yes", "debug uid = yes" and
> "debug class = yes"
> in order to get more useful logs with a lot of round trips out of
> customer environments.
> 
> metze

> From 03c698efd615ffe248870db84b4d1f880ce4d72c Mon Sep 17 00:00:00 2001
> From: Stefan Metzmacher <metze at samba.org>
> Date: Tue, 15 Nov 2011 21:50:54 +0100
> Subject: [PATCH] lib/util/debug: with log level = 10 we should be more verbose
> 
> log level = 10 already impacts performance, so we can turn on
> more details and print the pid, [e][u|g]id and class information.
> 
> So it implies "debug pid = yes", "debug uid = yes" and "debug class = yes".
> 
> This generates a lot more useful log files.
> 
> metze
> ---
>  lib/util/debug.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/util/debug.c b/lib/util/debug.c
> index cc57ba8..2812136 100644
> --- a/lib/util/debug.c
> +++ b/lib/util/debug.c
> @@ -948,10 +948,10 @@ bool dbghdrclass(int level, int cls, const char *location, const char *func)
>  
>  		header_str[0] = '\0';
>  
> -		if( state.settings.debug_pid)
> +		if (level >= 10 && state.settings.debug_pid)

Shouldn't that be || instead of && ?

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list