[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r8541: Make distinct all non-bug messages at notice or higher that (in tor/trunk: . src/common src/or)



Author: nickm
Date: 2006-09-29 18:33:34 -0400 (Fri, 29 Sep 2006)
New Revision: 8541

Modified:
   tor/trunk/
   tor/trunk/src/common/torgzip.c
   tor/trunk/src/common/util.c
   tor/trunk/src/or/config.c
   tor/trunk/src/or/connection.c
   tor/trunk/src/or/cpuworker.c
   tor/trunk/src/or/dns.c
   tor/trunk/src/or/routerlist.c
   tor/trunk/src/or/routerparse.c
Log:
 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.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r9023] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/src/common/torgzip.c
===================================================================
--- tor/trunk/src/common/torgzip.c	2006-09-29 22:33:31 UTC (rev 8540)
+++ tor/trunk/src/common/torgzip.c	2006-09-29 22:33:34 UTC (rev 8541)
@@ -79,7 +79,7 @@
 
   if (method == GZIP_METHOD && !is_gzip_supported()) {
     /* Old zlib version don't support gzip in deflateInit2 */
-    log_warn(LD_GENERAL, "Gzip not supported with zlib %s", ZLIB_VERSION);
+    log_warn(LD_BUG, "Gzip not supported with zlib %s", ZLIB_VERSION);
     return -1;
   }
 
@@ -132,7 +132,7 @@
  done:
   *out_len = stream->total_out;
   if (deflateEnd(stream)!=Z_OK) {
-    log_warn(LD_GENERAL, "Error freeing gzip structures");
+    log_warn(LD_BUG, "Error freeing gzip structures");
     goto err;
   }
   tor_free(stream);
@@ -178,7 +178,7 @@
 
   if (method == GZIP_METHOD && !is_gzip_supported()) {
     /* Old zlib version don't support gzip in inflateInit2 */
-    log_warn(LD_GENERAL, "Gzip not supported with zlib %s", ZLIB_VERSION);
+    log_warn(LD_BUG, "Gzip not supported with zlib %s", ZLIB_VERSION);
     return -1;
   }
 
@@ -213,7 +213,7 @@
           goto done;
         /* There may be more compressed data here. */
         if ((r = inflateEnd(stream)) != Z_OK) {
-          log_warn(LD_GENERAL, "Error freeing gzip structures");
+          log_warn(LD_BUG, "Error freeing gzip structures");
           goto err;
         }
         if (inflateInit2(stream, method_bits(method)) != Z_OK) {
@@ -251,7 +251,7 @@
   r = inflateEnd(stream);
   tor_free(stream);
   if (r != Z_OK) {
-    log_warn(LD_GENERAL, "Error freeing gzip structures");
+    log_warn(LD_BUG, "Error freeing gzip structures");
     goto err;
   }
 
@@ -304,7 +304,7 @@
 
   if (method == GZIP_METHOD && !is_gzip_supported()) {
     /* Old zlib version don't support gzip in inflateInit2 */
-    log_warn(LD_GENERAL, "Gzip not supported with zlib %s", ZLIB_VERSION);
+    log_warn(LD_BUG, "Gzip not supported with zlib %s", ZLIB_VERSION);
     return NULL;
  }
 

Modified: tor/trunk/src/common/util.c
===================================================================
--- tor/trunk/src/common/util.c	2006-09-29 22:33:31 UTC (rev 8540)
+++ tor/trunk/src/common/util.c	2006-09-29 22:33:34 UTC (rev 8541)
@@ -115,7 +115,7 @@
   result = dmalloc_malloc(file, line, size, DMALLOC_FUNC_MALLOC, 0, 0);
 
   if (PREDICT(result == NULL, 0)) {
-    log_err(LD_MM,"Out of memory. Dying.");
+    log_err(LD_MM,"Out of memory on malloc(). Dying.");
     /* If these functions die within a worker process, they won't call
      * spawn_exit, but that's ok, since the parent will run out of memory soon
      * anyway. */
@@ -147,7 +147,7 @@
 
   result = dmalloc_realloc(file, line, ptr, size, DMALLOC_FUNC_REALLOC, 0);
   if (PREDICT(result == NULL, 0)) {
-    log_err(LD_MM,"Out of memory. Dying.");
+    log_err(LD_MM,"Out of memory on realloc(). Dying.");
     exit(1);
   }
   return result;
@@ -165,7 +165,7 @@
 
   dup = dmalloc_strdup(file, line, s, 0);
   if (PREDICT(dup == NULL, 0)) {
-    log_err(LD_MM,"Out of memory. Dying.");
+    log_err(LD_MM,"Out of memory on strdup(). Dying.");
     exit(1);
   }
   return dup;

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2006-09-29 22:33:31 UTC (rev 8540)
+++ tor/trunk/src/or/config.c	2006-09-29 22:33:34 UTC (rev 8541)
@@ -2930,8 +2930,8 @@
       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 @@
     } 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 @@
     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 @@
     }
     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 @@
       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 @@
   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;
   }
 

Modified: tor/trunk/src/or/connection.c
===================================================================
--- tor/trunk/src/or/connection.c	2006-09-29 22:33:31 UTC (rev 8540)
+++ tor/trunk/src/or/connection.c	2006-09-29 22:33:34 UTC (rev 8541)
@@ -654,7 +654,7 @@
   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;
   }

Modified: tor/trunk/src/or/cpuworker.c
===================================================================
--- tor/trunk/src/or/cpuworker.c	2006-09-29 22:33:31 UTC (rev 8540)
+++ tor/trunk/src/or/cpuworker.c	2006-09-29 22:33:34 UTC (rev 8541)
@@ -348,7 +348,7 @@
   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 @@
 
   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++;

Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c	2006-09-29 22:33:31 UTC (rev 8540)
+++ tor/trunk/src/or/dns.c	2006-09-29 22:33:34 UTC (rev 8541)
@@ -1308,7 +1308,7 @@
   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 @@
 
   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++;

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2006-09-29 22:33:31 UTC (rev 8540)
+++ tor/trunk/src/or/routerlist.c	2006-09-29 22:33:34 UTC (rev 8541)
@@ -2492,10 +2492,11 @@
     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);

Modified: tor/trunk/src/or/routerparse.c
===================================================================
--- tor/trunk/src/or/routerparse.c	2006-09-29 22:33:31 UTC (rev 8540)
+++ tor/trunk/src/or/routerparse.c	2006-09-29 22:33:34 UTC (rev 8541)
@@ -481,7 +481,7 @@
   }
 
   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 @@
   }
 
   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 @@
     /* 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 @@
     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 @@
   }
 
   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);