From 02c71a7eb4ddbe3841a7b804a99b7b509e05a9d9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 25 Sep 2008 21:06:32 +0000 Subject: Widen the conditions under which we whine about not having a geoip file to include "a country code was configured in a node list." svn:r16968 --- src/or/geoip.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/or/geoip.c') diff --git a/src/or/geoip.c b/src/or/geoip.c index e948d60de..a0f0d4ae9 100644 --- a/src/or/geoip.c +++ b/src/or/geoip.c @@ -178,10 +178,12 @@ int geoip_load_file(const char *filename, or_options_t *options) { FILE *f; - int severity = should_record_bridge_info(options) ? LOG_WARN : LOG_INFO; + const char *msg = ""; + int severity = options_need_geoip_info(options, &msg) ? LOG_WARN : LOG_INFO; clear_geoip_db(); if (!(f = fopen(filename, "r"))) { - log_fn(severity, LD_GENERAL, "Failed to open GEOIP file %s.", filename); + log_fn(severity, LD_GENERAL, "Failed to open GEOIP file %s. %s", + filename, msg); return -1; } if (!geoip_countries) { @@ -193,7 +195,7 @@ geoip_load_file(const char *filename, or_options_t *options) smartlist_free(geoip_entries); } geoip_entries = smartlist_create(); - log_info(LD_GENERAL, "Parsing GEOIP file."); + log_notice(LD_GENERAL, "Parsing GEOIP file."); while (!feof(f)) { char buf[512]; if (fgets(buf, (int)sizeof(buf), f) == NULL) -- cgit v1.2.3