Re: Can i remove @0x in my log query message, bind 9.11
Hi there, On Mon, 4 Nov 2019, Nguyen Huy Bac wrote: ... bind 9.11, have @0x in log query message. But, my statistical system dont support two log message structure at the same. So, my question is: Can and How to remove @0x in my log query message. You could do this for example by piping the log messages to a 'sed' one-liner with syslog-ng, which would avoid the need to patch every time you install a new version of bind. -- 73, Ged. ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Can i remove @0x in my log query message, bind 9.11
Or patch the old version instead. -- Ondřej Surý — ISC > On 4 Nov 2019, at 15:14, Alan Clegg wrote: > > On 11/4/2019 5:57 AM, Tony Finch wrote: >> Nguyen Huy Bac wrote: >>> So, my question is: Can and How to remove @0x 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 > > ___ > Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe > from this list > > bind-users mailing list > bind-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/bind-users ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Can i remove @0x in my log query message, bind 9.11
On 11/4/2019 5:57 AM, Tony Finch wrote: Nguyen Huy Bac wrote: So, my question is: Can and How to remove @0x 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 ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Can i remove @0x in my log query message, bind 9.11
Nguyen Huy Bac wrote: > So, my question is: Can and How to remove @0x 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); } Tony. -- f.anthony.n.finchhttp://dotat.at/ West Forties, Cromarty, Forth: Northeasterly 6 to gale 8, occasionally 5 later. Rough or very rough. Rain or showers. Good, occasionally poor. ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Can i remove @0x in my log query message, bind 9.11
Hi Mr/Mrs I'm Bac, come from VNNIC, MIC We're using both bind 9.10 and bind 9.11 And from bind 9.11, have @0x in log query message. But, my statistical system dont support two log message structure at the same. So, my question is: Can and How to remove @0x in my log query message. Regards, In Old log: Nov 1 22:58:01 named[25206]: 01-Nov-2019 22:58:01.345 queries: info: client 8.19.117.54#60657 (viettel.com.vn): query: viettel.com.vn IN A -EDC () And new log 02-Nov-2019 06:06:30.171 queries: info: client @0x7f9f80020ac0 125.22.219.186#24184 (ns3.HosTiNgEr.Vn): query: ns3.HosTiNgEr.Vn IN -E(0)DC () 02-Nov-2019 06:06:30.171 queries: info: client @0x7f9f8c08f070 112.197.5.182#28597 (saostar.vn): query: saostar.vn IN DS -E(0)DC () 02-Nov-2019 06:06:30.171 queries: info: client @0x7f9f98030ba0 202.103.207.120#63809 (speedtesthn.fpt.vn): query: speedtesthn.fpt.vn IN A -E(0)DC () Bac, Nguyen Huy = DNS & VNIX - VNNIC Tel: +84 (4) 35564944 (607) Mobile: +84 936 689 866 Email: huybac.ngu...@vnnic.vn ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users