Disabling Query Logging Doesn't Do Anything

Hello. I am trying to disable the logging of queried domains. I would like to keep clients though, is this possible? I don't really care about long term data. Specifically I'd like the query log to still work and just not log the domains. Is this possible? If not I have tried disabling query logging in the web interface, however it doesn't seem to make a difference.

Expected Behaviour:

pihole.log isn't logged to when query logging is disabled.

Actual Behaviour:

pihole.log still being logged to including domains, even if privacy settings explicitly say to not log domains.

Debug Token:

ro7120ylkl

Pi-Hole has both a log and a long term database, controlled with different settings.

Disabling query logging stops Pi-Hole from writing to /var/log/pihole.log, but does not disable the long term database. The data you see in the query log on the admin GUI is the data from the long term database.

When pihole-FTL starts or restarts, it reads (by default) 24 hours of data from the long term database, puts this in memory and uses it to display the query log.

From your debug log (applicable sections below), you are using the database in default configuration, and your privacy level is 1. Logging to the pihole log is stopped.

   QUERY_LOGGING=false

   [2018-11-22 11:19:16.243]    MAXDBDAYS: max age for stored queries is 365 days
   [2018-11-22 11:19:16.243]    DBINTERVAL: saving to DB file every minute
   [2018-11-22 11:19:16.243]    DBFILE: Using /etc/pihole/pihole-FTL.db
   [2018-11-22 11:19:16.243]    MAXLOGAGE: Importing up to 24.0 hours of log data
   [2018-11-22 11:19:16.243] Notice: Changing privacy level from 0 to 1
   [2018-11-22 11:19:16.243]    PRIVACYLEVEL: Set to 1

When you disable query logging as you have done, the only apparent difference you will see is that you can no longer tail the pihole.log, since it is not used.

The documentation links below discuss privacy settings and control of the long term database. Level 1 privacy (your current setting) disables top domains and top ads. You will want to use a higher privacy level.

1 Like

Thank you. However when I have query logging disabled and actually tail the physical pihole.log file, it still is being written to.

Run this command and see if this resolves it:

sudo service pihole-FTL restart

Thanks for the suggestion. This unfortunately does not seem to make a difference.

Try running pihole logging off.

Sorry but that doesn't work either. It just flushes the logs and says it's disabled, but it's still writing to the log.

Problem solved! Turns out I had querry-logging=extra in /etc/dnsmasq.conf. Removed it and now there is no logging.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.