Can i remove @0x<hexadecimal-number> in my log query message, bind 9.11

Alan Clegg aclegg at isc.org
Mon Nov 4 14:14:18 UTC 2019


On 11/4/2019 5:57 AM, Tony Finch wrote:
> Nguyen Huy Bac <huybac.nguyen at VNNIC.VN> wrote:
> 
>> So, my question is: Can and How to remove @0x<hexadecimal-number> in my
>> log query message.
> 
> There is no convenient way. You have to apply this patch:
> 
> diff --git a/lib/ns/client.c b/lib/ns/client.c
> index f16ece8c49..7861f12084 100644
> --- a/lib/ns/client.c
> +++ b/lib/ns/client.c
> @@ -4066,8 +4066,8 @@ ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
>   	}
> 
>   	isc_log_write(ns_lctx, category, module, level,
> -		      "client @%p %s%s%s%s%s%s%s%s: %s",
> -		      client, peerbuf, sep1, signer, sep2, qname, sep3,
> +		      "client %s%s%s%s%s%s%s%s: %s",
> +		      peerbuf, sep1, signer, sep2, qname, sep3,
>   		      sep4, viewname, msgbuf);
>   }

While this patch does what it says, it doesn't mention the fact that all 
versions of BIND for the foreseeable future are going to have this 
additional field (it's in all currently supported versions of BIND), so 
you will be MUCH better off fixing the software that is ingesting the 
log file than to patch BIND every time you upgrade.

AlanC



More information about the bind-users mailing list