Tstat can produce a "log_dns_complete" file which logs information from every 
DNS request and response.
It is NOT generated by default, so it must be explicitly activated with
the directive in runtime.conf. Moreover, Tstat must have been compiled to 
include the LDNS library (as reported by 'tstat -v')[*].

All UDP packets are checked looking for DNS payload, and, in case it is found,
the corresponding log lines are produced.
A single log line is produced for each resource record (RR) found in the packet.
As such, a single packet may generate multiple lines.

The log_dns_complete contains 3 types of lines:
    - REQ: For DNS request packets
    - RESP: For DNS response packets
    - RESP_ERR: For DNS reponse packets that report an error (e.g., not existing domain)

Here it follows a brief description of the columns.

############################################################################
# Field # Unit # Long description                       
############################################################################
#   1   #  -   # IP addresses of the client (sending the request/receiving the response)
#   2   #  -   # UDP port addresses for the client
#   3   # 0/1  # 1 = client has internal IP, 0 = client has external IP
#   4   # 0/1  # 1 = client IP is CryptoPAn anonymized
#   5   #  -   # IP addresses of the server (sending the request/receiving the response)
#   6   #  -   # UDP port addresses for the server
#   7   # 0/1  # 1 = server has internal IP, 0 = server has external IP
#   8   # 0/1  # 1 = server IP is CryptoPAn anonymized
#   9   #  ms  # Packet Time
#  10   #  -   # Entry type: REQ, RESP or RESP_ERR
#  11   #  -   # DNS Transaction ID
#  12   #  -   # Query
#  13   #  -   # TTL of the response (only for RESP)
#  14   #  -   # Class (of the query for REQ, of the RR for RESP)
#  15   #  -   # Type  (of the query for REQ, of the RR for RESP)
#  16   #  -   # Answer (IP address or domain for RESP, Error code for RESP_ERR)
#  17   #  -   # DNS flags in the packet
#  18   #  -   # Query count in the packet
#  19   #  -   # Answer count in the packet
#  20   #  -   # NS records count in the packet
#  21   #  -   # Additional record count in the packet
#  22   # bytes # Packet size
############################################################################

[*] Details in the doc/README.log_dns file