Skip to content

Unclear UX for disabling query logging #1151

@kaysond

Description

@kaysond

As of Pi-hole Version v4.3.2 Web Interface Version v4.3.2 FTL Version v4.3.1, clicking the "Disable Query Logging" button on settings.php only disables logging to /var/log/pi-hole.log, but not the long term database. (I think; queries still show up in the Recent/Query Log and Long Term Data interfaces even though they're not in the file, so I'm assuming its the DB).

If I set the "DNS resolver privacy level" in settings.php?tab=privacy to "No Statistics Mode", then all query data disappears, but its still logged to the file. Fortunately in this case, a message indicates that file logging must be disabled separately.

The UX is a little unclear here. I expected "Disable Query Logging" to stop all query logging, both to the file and to the database/Query Log interfaces. I think if this button is just intended to disable logging to file, a more clear name would be nice, e.g. "Disable Query Logging to File".

Also, I would think that if you set the highest privacy level, it should not allow the queries to be logged to file to occur in any circumstance.

I'm guessing maybe the file logging toggle was initially added so you could disable it for benchmarking, and not for privacy, then the privacy settings were added later. At this point, though the settings may have had different initial purposes, they're now somewhat related. It would be nice if they could be grouped together.

One option could be:

  • System Tab
    • Disable Logging (Disable query logging)
    • Disable Logging and Flush Logs (Disable query logging and flush logs)
    • Flush Logs
  • Privacy Tab
    • Existing options as is
    • Don't log queries to pihole log file

The idea here is to sort of separate the "performance" option of disabling the log file from the "privacy" option of not logging queries to the file. The new button texts in the system tab are performance-oriented and indicate that all logging is disabled and all log entries are flushed. This would be slightly new functionality, but seems like it would be better for benchmarking anyways.

The new checkbox in the Privacy Tab just controls whether queries are logged or not, irrespective of the general logging setting. Selecting the highest privacy level should probably automatically check this box and flush the log files.

See also: pi-hole/pi-hole#2339

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions