aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-12-13 00:44:39 +0000
committerRoger Dingledine <arma@torproject.org>2004-12-13 00:44:39 +0000
commit011ad3cba5dadceb4b204aced00e3cd598465d1d (patch)
tree7f6eaf60a5189244ae5b26c0839667451b34c3f0 /src/or/dirserv.c
parent972124aab936a9fbfd3a736c903124d89515af78 (diff)
downloadtor-011ad3cba5dadceb4b204aced00e3cd598465d1d.tar.gz
tor-011ad3cba5dadceb4b204aced00e3cd598465d1d.zip
clean up logging,
make it clearer which warns are bugs, make the control log event match its specification, point out a bug in how we deal with failure when renewing the tls context. svn:r3138
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 2156b52843..2af2ddbdc1 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -111,19 +111,19 @@ dirserv_parse_fingerprint_file(const char *fname)
for (list=front; list; list=list->next) {
nickname = list->key; fingerprint = list->value;
if (strlen(nickname) > MAX_NICKNAME_LEN) {
- log(LOG_WARN, "Nickname '%s' too long in fingerprint file. Skipping.", nickname);
+ log(LOG_NOTICE, "Nickname '%s' too long in fingerprint file. Skipping.", nickname);
continue;
}
if (strlen(fingerprint) != FINGERPRINT_LEN ||
!crypto_pk_check_fingerprint_syntax(fingerprint)) {
- log_fn(LOG_WARN, "Invalid fingerprint (nickname '%s', fingerprint %s). Skipping.",
+ log_fn(LOG_NOTICE, "Invalid fingerprint (nickname '%s', fingerprint %s). Skipping.",
nickname, fingerprint);
continue;
}
if (0==strcasecmp(nickname, DEFAULT_CLIENT_NICKNAME)) {
/* If you approved an OR called "client", then clients who use
* the default nickname could all be rejected. That's no good. */
- log(LOG_WARN,
+ log(LOG_NOTICE,
"Authorizing a nickname '%s' would break many clients; skipping.",
DEFAULT_CLIENT_NICKNAME);
continue;
@@ -131,7 +131,7 @@ dirserv_parse_fingerprint_file(const char *fname)
for (i = 0; i < smartlist_len(fingerprint_list_new); ++i) {
ent = smartlist_get(fingerprint_list_new, i);
if (0==strcasecmp(ent->nickname, nickname)) {
- log(LOG_WARN, "Duplicate nickname '%s'. Skipping.",nickname);
+ log(LOG_NOTICE, "Duplicate nickname '%s'. Skipping.",nickname);
break; /* out of the for. the 'if' below means skip to the next line. */
}
}
@@ -352,13 +352,13 @@ dirserv_add_descriptor(const char **desc)
/* Is there too much clock skew? */
now = time(NULL);
if (ri->published_on > now+ROUTER_ALLOW_SKEW) {
- log_fn(LOG_WARN, "Publication time for nickname '%s' is too far in the future; possible clock skew. Not adding.", ri->nickname);
+ log_fn(LOG_NOTICE, "Publication time for nickname '%s' is too far in the future; possible clock skew. Not adding.", ri->nickname);
routerinfo_free(ri);
*desc = end;
return 0;
}
if (ri->published_on < now-ROUTER_MAX_AGE) {
- log_fn(LOG_WARN, "Publication time for router with nickname '%s' is too far in the past. Not adding.", ri->nickname);
+ log_fn(LOG_NOTICE, "Publication time for router with nickname '%s' is too far in the past. Not adding.", ri->nickname);
routerinfo_free(ri);
*desc = end;
return 0;
@@ -737,7 +737,7 @@ void dirserv_set_cached_directory(const char *directory, time_t when,
char filename[512];
tor_snprintf(filename,sizeof(filename),"%s/cached-directory", get_options()->DataDirectory);
if (write_str_to_file(filename,cached_directory.dir,0) < 0) {
- log_fn(LOG_WARN, "Couldn't write cached directory to disk. Ignoring.");
+ log_fn(LOG_NOTICE, "Couldn't write cached directory to disk. Ignoring.");
}
}
}