Seeing lines with "Capture-DEBUG" string in json output
On my desktop running Scientific-Linux-6.9, I installed wireshark-2.6.1 from sources. I am using the below command line for capturing json output:
/opt/wireshark-2.6.1/bin/tshark -c 10 -T json -n -Q -q -t u > /tmp/out.txt
I do see a json output in the /tmp/out.txt, but before the json string, there are few lines with the "Capture-DEBUG" string in them. A sample line looks likes this:
(process:14338): Capture-DEBUG: Interface [randpkt] "Random packet generator"
Any idea how to suppress these lines from appearing in the output file?
UPDATE: For testing, got two VM's running, one with Scientific-Linux-6.9 (same as my desktop version) and the second one a CentOS-Linux-7.4. The above mentioned problem appeared on Scientific-Linux-6.9 VM but not on CentOS-Linux-7.4 VM. Could be a Scientific-Linux-6.9 distro related issue?
Thanks Jitendra
As described here I used the tshark option '-oconsole.log.level:0' but still I the see the 'Capture-DEBUG' lines.
OP here, what works on my system (Scientific Linux release 6.9) is the old stable release - wireshark-2.4.7 . Using this version I do not see the debug string mentioned in my question. I also installed version 2.6.0 and version 2.5.1(devel) from sources both have the same issue as version 2.6.1
So seems I need to ditch the latest stable and will use the old stable release - version 2.4.7.
The json produced by tshark version 2.4.7 for bulk loading to elasticsearch gives '"Duplicate field' errors which seems to be fixed in 2.6.x, so may be as @Pascal suggests go with the worst case - to edit extcap.c and comment the calls to g_log and recompile.