mirror of
https://github.com/pi-hole/FTL.git
synced 2026-10-06 22:13:02 +01:00
Also honor misc.hide_connection_error in pihole.log
`FTL_connection_error()` writes the same event twice: through `log_connection_error()` into FTL.log and the message table, and through `my_syslog()` into pihole.log. Only the first one was gated, and the second is not subject to the five-second throttle, so the setting left the more frequent of the two lines in place. Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
1 file changed
+3
-2
@@ -4349,8 +4349,9 @@ void FTL_connection_error(const char *reason, const union mysockaddr *addr, cons
|
||||
// Log to FTL.log
|
||||
log_debug(DEBUG_QUERIES, "Connection error (%s#%u, ID %d): %s (%s)%s", ip, port, id, reason, error, extra);
|
||||
|
||||
// Log to pihole.log
|
||||
my_syslog(priority, "%s: %s", reason, error);
|
||||
// Log to pihole.log (unless the user asked us to hide these warnings)
|
||||
if(!config.misc.hide_connection_error.v.b)
|
||||
my_syslog(priority, "%s: %s", reason, error);
|
||||
|
||||
// Add to Pi-hole diagnostics but do not add messages more often than
|
||||
// once every five seconds to avoid hammering the database with errors
|
||||
|
||||
Reference in new issue
Block a user