summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-09-29 22:33:34 +0000
committerNick Mathewson <nickm@torproject.org>2006-09-29 22:33:34 +0000
commit8308a379086a82126f685f3d8668e48b0453880d (patch)
treeff58a6840424547da934e4bd85e43d14505c91e7 /src/or
parent9027491ae154280094ecf292dc5a8953532363cb (diff)
downloadtor-8308a379086a82126f685f3d8668e48b0453880d.tar.gz
tor-8308a379086a82126f685f3d8668e48b0453880d.zip
r9023@Kushana: nickm | 2006-09-29 17:27:24 -0400
Make distinct all non-bug messages at notice or higher that appear 3 or more times. svn:r8541
Diffstat (limited to 'src/or')
-rw-r--r--src/or/config.c20
-rw-r--r--src/or/connection.c2
-rw-r--r--src/or/cpuworker.c4
-rw-r--r--src/or/dns.c4
-rw-r--r--src/or/routerlist.c9
-rw-r--r--src/or/routerparse.c10
6 files changed, 26 insertions, 23 deletions
diff --git a/src/or/config.c b/src/or/config.c
index b4fdf46b34..4d4d27d287 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -2930,8 +2930,8 @@ parse_log_severity_range(const char *range, int *min_out, int *max_out)
char *tmp_sev = tor_strndup(range, cp - range);
levelMin = parse_log_level(tmp_sev);
if (levelMin < 0) {
- log_warn(LD_CONFIG, "Unrecognized log severity '%s': must be one of "
- "err|warn|notice|info|debug", tmp_sev);
+ log_warn(LD_CONFIG, "Unrecognized minimum log severity '%s': must be "
+ "one of err|warn|notice|info|debug", tmp_sev);
tor_free(tmp_sev);
return -1;
}
@@ -2942,8 +2942,8 @@ parse_log_severity_range(const char *range, int *min_out, int *max_out)
} else {
levelMax = parse_log_level(cp+1);
if (levelMax < 0) {
- log_warn(LD_CONFIG, "Unrecognized log severity '%s': must be one of "
- "err|warn|notice|info|debug", cp+1);
+ log_warn(LD_CONFIG, "Unrecognized maximum log severity '%s': must be "
+ "one of err|warn|notice|info|debug", cp+1);
return -1;
}
}
@@ -3025,7 +3025,7 @@ options_init_logs(or_options_t *options, int validate_only)
smartlist_split_string(elts, opt->value, NULL,
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 3);
if (smartlist_len(elts) == 0) {
- log_warn(LD_CONFIG, "Bad syntax on Log option 'Log %s'", opt->value);
+ log_warn(LD_CONFIG, "No arguments to Log option 'Log %s'", opt->value);
ok = 0; goto cleanup;
}
if (parse_log_severity_range(smartlist_get(elts,0), &levelMin,
@@ -3045,7 +3045,8 @@ options_init_logs(or_options_t *options, int validate_only)
}
if (!strcasecmp(smartlist_get(elts,1), "file")) {
if (smartlist_len(elts) != 3) {
- log_warn(LD_CONFIG, "Bad syntax on Log option 'Log %s'", opt->value);
+ log_warn(LD_CONFIG, "Bad syntax on file Log option 'Log %s'",
+ opt->value);
ok = 0; goto cleanup;
}
if (!validate_only) {
@@ -3057,7 +3058,8 @@ options_init_logs(or_options_t *options, int validate_only)
goto cleanup;
}
if (smartlist_len(elts) != 2) {
- log_warn(LD_CONFIG, "Bad syntax on Log option 'Log %s'", opt->value);
+ log_warn(LD_CONFIG, "Wrong number of arguments on Log option 'Log %s'",
+ opt->value);
ok = 0; goto cleanup;
}
if (!strcasecmp(smartlist_get(elts,1), "stdout")) {
@@ -3263,8 +3265,8 @@ parse_dir_server_line(const char *line, int validate_only)
items = smartlist_create();
smartlist_split_string(items, line, NULL,
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, -1);
- if (smartlist_len(items) < 2) {
- log_warn(LD_CONFIG, "Too few arguments to DirServer line.");
+ if (smartlist_len(items) < 1) {
+ log_warn(LD_CONFIG, "No arguments on DirServer line.");
goto err;
}
diff --git a/src/or/connection.c b/src/or/connection.c
index aba21c681c..407e18f128 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -654,7 +654,7 @@ connection_create_listener(const char *listenaddress, uint16_t listenport,
conn->port = usePort;
if (connection_add(conn) < 0) { /* no space, forget it */
- log_warn(LD_NET,"connection_add failed. Giving up.");
+ log_warn(LD_NET,"connection_add for listener failed. Giving up.");
connection_free(conn);
goto err;
}
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index 17c176ae11..5fae08f668 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -348,7 +348,7 @@ spawn_cpuworker(void)
conn->address = tor_strdup("localhost");
if (connection_add(conn) < 0) { /* no space, forget it */
- log_warn(LD_NET,"connection_add failed. Giving up.");
+ log_warn(LD_NET,"connection_add for cpuworker failed. Giving up.");
connection_free(conn); /* this closes fd */
return -1;
}
@@ -374,7 +374,7 @@ spawn_enough_cpuworkers(void)
while (num_cpuworkers < num_cpuworkers_needed) {
if (spawn_cpuworker() < 0) {
- log_warn(LD_GENERAL,"Spawn failed. Will try again later.");
+ log_warn(LD_GENERAL,"Cpuworker spawn failed. Will try again later.");
return;
}
num_cpuworkers++;
diff --git a/src/or/dns.c b/src/or/dns.c
index 1a955cd2aa..bc8d9ce2f1 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -1308,7 +1308,7 @@ spawn_dnsworker(void)
conn->address = tor_strdup("<unused>");
if (connection_add(conn) < 0) { /* no space, forget it */
- log_warn(LD_NET,"connection_add failed. Giving up.");
+ log_warn(LD_NET,"connection_add for dnsworker failed. Giving up.");
connection_free(conn); /* this closes fd */
return -1;
}
@@ -1362,7 +1362,7 @@ spawn_enough_dnsworkers(void)
while (num_dnsworkers < num_dnsworkers_needed) {
if (spawn_dnsworker() < 0) {
- log_warn(LD_EXIT,"Spawn failed. Will try again later.");
+ log_warn(LD_EXIT,"DNS worker spawn failed. Will try again later.");
return -1;
}
num_dnsworkers++;
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 1f932469f1..7099633a54 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2492,10 +2492,11 @@ router_get_combined_status_by_nickname(const char *nickname,
char fp[HEX_DIGEST_LEN+1];
base16_encode(fp, sizeof(fp),
best->status.identity_digest, DIGEST_LEN);
- log_warn(LD_CONFIG, "You specified a server \"%s\" by name, but the "
- "directory authorities do not have a binding for this nickname. "
- "To make sure you get the same server in the future, refer to "
- "it by key, as \"$%s\".", nickname, fp);
+ log_warn(LD_CONFIG,
+ "To look up a status, you specified a server \"%s\" by name, but the "
+ "directory authorities do not have a binding for this nickname. "
+ "To make sure you get the same server in the future, refer to "
+ "it by key, as \"$%s\".", nickname, fp);
best->name_lookup_warned = 1;
}
smartlist_free(matches);
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index b73697ab40..4eadd1c513 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -481,7 +481,7 @@ router_parse_runningrouters(const char *str)
}
if (!(tok = find_first_by_keyword(tokens, K_PUBLISHED))) {
- log_warn(LD_DIR, "Missing published time on directory.");
+ log_warn(LD_DIR, "Missing published time on running-routers.");
goto err;
}
tor_assert(tok->n_args == 1);
@@ -818,7 +818,7 @@ router_parse_entry_from_string(const char *s, const char *end,
}
if (!(tok = find_first_by_keyword(tokens, K_PUBLISHED))) {
- log_warn(LD_DIR, "Missing published time"); goto err;
+ log_warn(LD_DIR, "Missing published time on router descriptor"); goto err;
}
tor_assert(tok->n_args == 1);
if (parse_iso_time(tok->args[0], &router->cache_info.published_on) < 0)
@@ -854,7 +854,7 @@ router_parse_entry_from_string(const char *s, const char *end,
/* If there's a fingerprint line, it must match the identity digest. */
char d[DIGEST_LEN];
if (tok->n_args < 1) {
- log_warn(LD_DIR, "Too few arguments to fingerprint");
+ log_warn(LD_DIR, "Too few arguments to router fingerprint");
goto err;
}
tor_strstrip(tok->args[0], " ");
@@ -1163,7 +1163,7 @@ networkstatus_parse_from_string(const char *s)
goto err;
}
if (tok->n_args < 1) {
- log_warn(LD_DIR, "Too few arguments to fingerprint");
+ log_warn(LD_DIR, "Too few arguments to networkstatus fingerprint");
goto err;
}
if (base16_decode(ns->identity_digest, DIGEST_LEN, tok->args[0],
@@ -1221,7 +1221,7 @@ networkstatus_parse_from_string(const char *s)
}
if (!(tok = find_first_by_keyword(tokens, K_PUBLISHED))) {
- log_warn(LD_DIR, "Missing published time on directory.");
+ log_warn(LD_DIR, "Missing published time on network-status.");
goto err;
}
tor_assert(tok->n_args == 1);