Pi-Hole has two logs/databases. You have turned off logging to one of the two.
The pihole.log is toggled with the pihole -l command and on the Admin GUI (settings > System) in the orange box labeled "Disable Query logging."
pihole -l -h
Usage: pihole logging [options]
Example: 'pihole logging on'
Specify whether the Pi-hole log should be used
Options:
on Enable the Pi-hole log at /var/log/pihole.log
off Disable and flush the Pi-hole log at /var/log/pihole.log
off noflush Disable the Pi-hole log at /var/log/pihole.log
There is a second file, the long term database, that stores data for a default of 365 days. This database is controlled from commands in the /etc/pihole/pihole-FTL.conf file.
You can verify the size of your files and access dates to see if they are active:
stat /etc/pihole/pihole-FTL.db
stat /var/log/pihole.log
The documentation below discusses the long term database and configuration options.
It is a log that contains queries, and yes, you are missing something.
Pi-Hole works with two data files - one is a log, the other is a database.
In the previous version of Pi-Hole, Pi-Hole was unable to query the dnsmasq log, so a separate log was kept (/var/log/pihole.log). The new FTLDNS in V4.0 forked dnsmasq, gaining access to its inner workings and allowing it to query dnsmasq for statistics, which eliminated the need for the separate log file.
Logging to this log is controlled by Web GUI > Settings > Disable logging.
A separate SQLite database is maintained for long term query data at /etc/pihole/pihole-FTL.db
I'm trying to disable the logging of queries. For this, I used the "disable query log" button, after seeing that the install-time option to do the same seemed (and apparently was) nonfunctional.
In some but not all circumstances, it may be acceptable (or even desirable) for queries to be logged for a short time for troubleshooting (bonus marks for making that time configurable), but never written to disk.
If the user clicks a button that is labelled as disabling query logging, and yet queries are still logged, this is a tremendous privacy (and UX) failure — and, for a project intended to protect and enhance privacy, I hope we agree that the bar must be set higher than this.
The terminology is perhaps unclear, and a user who doesn't refer to the documentation might reasonably interpret that disabling query logging stops all logging.
The documentation is clear on the long term database and it's options for use. You can disable the database completely, should you choose to.
There is a section in the web admin GUI (Settings > Privacy) that describe DNS resolver privacy levels and allow the user to select one that meets their needs. Privacy levels are discussed in the documentation here: Privacy levels - Pi-hole documentation
To completely disable logging of all queries and for maximum privacy, these settings should meet your needs:
Disable query logging and flush logs (which you have done).
In /etc/pihole/pihole-FTL.conf, enter the line below, save and exit. Then sudo service pihole-FTL restart
MAXDBDAYS=0
On the web GUI (settings > privacy) - select "Paranoia mode". This corresponds to privacy level 4 in the documentation.
Delete any existing pihole.log variants and the SQL database.
As features have been added over time, perhaps a future release can improve the presentation of the logging and privacy options to the user.
I recommend you submit a feature request for any changes to the user interface that would improve the user interface or clarify the available privacy and logging options.