Extra logging for inotify code.

This commit is contained in:
Simon Kelley
2015-02-03 21:52:48 +00:00
parent 2941d3ac89
commit f9c863708c
3 changed files with 10 additions and 7 deletions

View File

@@ -1022,11 +1022,10 @@ int read_hostsfile(char *filename, unsigned int index, int cache_size, struct cr
fclose(f); fclose(f);
if (rhash) if (rhash)
{ rehash(name_count);
rehash(name_count);
my_syslog(LOG_INFO, _("read %s - %d addresses"), filename, addr_count); my_syslog(LOG_INFO, _("read %s - %d addresses"), filename, addr_count);
}
return name_count; return name_count;
} }

View File

@@ -192,7 +192,9 @@ int inotify_check(time_t now)
strcpy(path, ah->fname); strcpy(path, ah->fname);
strcat(path, "/"); strcat(path, "/");
strcat(path, in->name); strcat(path, in->name);
my_syslog(LOG_INFO, _("inotify, new or changed file %s"), path);
if (ah->flags & AH_HOSTS) if (ah->flags & AH_HOSTS)
{ {
read_hostsfile(path, ah->index, 0, NULL, 0); read_hostsfile(path, ah->index, 0, NULL, 0);

View File

@@ -4068,11 +4068,13 @@ static void read_file(char *file, FILE *f, int hard_opt)
#ifdef HAVE_DHCP #ifdef HAVE_DHCP
int option_read_dynfile(char *file, int flags) int option_read_dynfile(char *file, int flags)
{ {
my_syslog(MS_DHCP | LOG_INFO, _("read %s"), file);
if (flags & AH_DHCP_HST) if (flags & AH_DHCP_HST)
return one_file(file, LOPT_BANK); return one_file(file, LOPT_BANK);
else if (flags & AH_DHCP_OPT) else if (flags & AH_DHCP_OPT)
return one_file(file, LOPT_OPTS); return one_file(file, LOPT_OPTS);
return 0; return 0;
} }
#endif #endif