[PATCH] libads: improve debug msg in sitename_fetch

Michael Adam obnox at samba.org
Tue Jul 12 15:35:48 UTC 2016


On 2016-07-12 at 17:27 +0200, Volker Lendecke wrote:
> On Tue, Jul 12, 2016 at 05:15:40PM +0200, Michael Adam wrote:
> > On 2016-07-12 at 17:07 +0200, Volker Lendecke wrote:
> > > On Tue, Jul 12, 2016 at 03:38:30PM +0200, Michael Adam wrote:
> > > > Review appreciated.
> > > 
> > > If that kind of msg is touched, what about using DBG_INFO?
> > 
> > Good point!
> > Updated patch attached.
> 
> One point of DBG_INFO is that it prefixes __func__ already, so you
> could dump the "sitename_fetch: " piece of the message.

So true!... :-)
Thanks for you patience, and updated v3 patch attached.

Michael
-------------- next part --------------
From 7294aa2197d30bcf7a950f51df06543a7f92f16e Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Tue, 12 Jul 2016 10:23:24 +0200
Subject: [PATCH] libads: improve debug messages in sitename_fetch()

Signed-off-by: Michael Adam <obnox at samba.org>
---
 source3/libads/sitename_cache.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/source3/libads/sitename_cache.c b/source3/libads/sitename_cache.c
index b064aea..3a13107 100644
--- a/source3/libads/sitename_cache.c
+++ b/source3/libads/sitename_cache.c
@@ -98,11 +98,10 @@ char *sitename_fetch(TALLOC_CTX *mem_ctx, const char *realm)
 	ret = gencache_get( key, mem_ctx, &sitename, &timeout );
 	SAFE_FREE(key);
 	if ( !ret ) {
-		DEBUG(5,("sitename_fetch: No stored sitename for %s\n",
-			query_realm));
+		DBG_INFO("No stored sitename for realm '%s'\n", query_realm);
 	} else {
-		DEBUG(5,("sitename_fetch: Returning sitename for %s: \"%s\"\n",
-			query_realm, sitename ));
+		DBG_INFO("Returning sitename for realm '%s': \"%s\"\n",
+			 query_realm, sitename);
 	}
 	return sitename;
 }
-- 
2.5.5

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160712/62f41de0/signature.sig>


More information about the samba-technical mailing list