Update logging in /var/log/pihole.log to include blocklist that's blocking a domain


In /var/log/pihole.log we’ll have a log entry like /etc/pihole/gravity.list www.googleadservices.com but the log entry to include the blocklist that’s causing the site to be blocked. Maybe using the ‘query adlist’ function? I’d like to use this to be able to see which adlists are useful and which aren’t, so I can figure out if I need to pare down the blocklists.

Currently running Pi-hole Version vDev (FTLDNS, v3.3-75-g82d5afe) Web Interface Version vDev (FTLDNS, v3.2.1-123-g89090261) FTL Version vDev (FTLDNS, vDev-1ca6b58)


Thanks for the feature request. In the case where a domain appears on multiple lists, how would you suggest we add the multiple entries to the log? I can see a situation where people with dozens of lists that each contain the domain, and that would make for a rather unwieldy output.


That’s a very good point, something like a google ad domain is on like 12 blocklists for me. Maybe just using a delimiter of some sort that’s not used in a blocklist URI. My first guess would be ;

I would think this should be an option that people are able enable for troubleshooting or advanced users. I’m not sure it’d make sense to show this output in the ‘tail pihole.log’ in the WebGUI for the reason you’d raised.


Would something like a button on the web interface list of domain queries that would automate a pihole -q <domain> be something of use? It wouldn’t be a streaming display, but would give you some more information. Or perhaps instead of the names of the lists, a number that shows how many lists it appears on? The /var/log/pihole.log is currently pretty tightly coupled with the output from dnsmasq but with FTLDNS we may be able to implement more features as we grow.


That could work. I could automate it so I’m able to do some reporting using something like Splunk or Kibana.