mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Inotify: make "flushed" log message more understandable.
Saying we've "flushed x outdated entries" is confusing, since the count is the total number of entries in the modified file, most of which are going to get added straight back when the file is re-read. The log now looks like dnsmasq: inotify: /tmp/dir/1 (new or modified) dnsmasq: inotify: flushed 1 addresses read from /tmp/dir/1 dnsmasq: read /tmp/dir/1 - 2 addresses which hopefully make it more obvious that /tmp/dir/1 contained one address before, and now contains two.
This commit is contained in:
@@ -296,9 +296,9 @@ int inotify_check(time_t now)
|
||||
|
||||
/* Is this is a deletion event? */
|
||||
if (in->mask & IN_DELETE)
|
||||
my_syslog(LOG_INFO, _("inotify: %s (removed)"), path);
|
||||
my_syslog(LOG_INFO, _("inotify: %s removed"), path);
|
||||
else
|
||||
my_syslog(LOG_INFO, _("inotify: %s (new or modified)"), path);
|
||||
my_syslog(LOG_INFO, _("inotify: %s new or modified"), path);
|
||||
|
||||
if (dd->flags & AH_HOSTS)
|
||||
{
|
||||
@@ -306,7 +306,7 @@ int inotify_check(time_t now)
|
||||
{
|
||||
const unsigned int removed = cache_remove_uid(ah->index);
|
||||
if (removed > 0)
|
||||
my_syslog(LOG_INFO, _("flushed %u outdated entries"), removed);
|
||||
my_syslog(LOG_INFO, _("inotify: flushed %u addresses read from %s"), removed, path);
|
||||
|
||||
/* (Re-)load hostsfile only if this event isn't triggered by deletion */
|
||||
if (!(in->mask & IN_DELETE))
|
||||
|
||||
Reference in New Issue
Block a user