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

[or-cvs] clean up logging,



Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or

Modified Files:
	circuitbuild.c circuituse.c connection.c connection_edge.c 
	connection_or.c control.c directory.c dirserv.c dns.c 
	hibernate.c main.c onion.c relay.c 
Log Message:
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.


Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- circuitbuild.c	7 Dec 2004 15:29:54 -0000	1.74
+++ circuitbuild.c	13 Dec 2004 00:44:38 -0000	1.75
@@ -573,12 +573,12 @@
 //         (unsigned int)*(uint32_t*)(key_data+40), (unsigned int)*(uint32_t*)(key_data+40+16));
   if (!(cpath->f_crypto =
         crypto_create_init_cipher(key_data+(2*DIGEST_LEN),1))) {
-    log(LOG_WARN,"forward cipher initialization failed.");
+    log(LOG_WARN,"Bug: forward cipher initialization failed.");
     return -1;
   }
   if (!(cpath->b_crypto =
         crypto_create_init_cipher(key_data+(2*DIGEST_LEN)+CIPHER_KEY_LEN,0))) {
-    log(LOG_WARN,"backward cipher initialization failed.");
+    log(LOG_WARN,"Bug: backward cipher initialization failed.");
     return -1;
   }
 
@@ -758,7 +758,7 @@
   else if (purpose == CIRCUIT_PURPOSE_S_CONNECT_REND)
     routelen = 4;
   else {
-    log_fn(LOG_WARN,"Unhandled purpose %d", purpose);
+    log_fn(LOG_WARN,"Bug: unhandled purpose %d", purpose);
     return -1;
   }
 #endif
@@ -985,7 +985,7 @@
     smartlist_t *needed_ports = circuit_get_unhandled_ports(time(NULL));
 
     if (best_support == -1) {
-      log(LOG_WARN, "All routers are down or middleman -- choosing a doomed exit at random.");
+      log(LOG_NOTICE, "All routers are down or middleman -- choosing a doomed exit at random.");
     }
     for (try = 0; try < 2; try++) {
       /* try once to pick only from routers that satisfy a needed port,
@@ -1047,7 +1047,7 @@
           NULL, 0, 1, options->_AllowUnverified & ALLOW_UNVERIFIED_RENDEZVOUS, 0);
       return r;
   }
-  log_fn(LOG_WARN,"Unhandled purpose %d", purpose);
+  log_fn(LOG_WARN,"Bug: unhandled purpose %d", purpose);
   return NULL;
 }
 

Index: circuituse.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuituse.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- circuituse.c	7 Dec 2004 15:29:54 -0000	1.37
+++ circuituse.c	13 Dec 2004 00:44:38 -0000	1.38
@@ -721,7 +721,7 @@
   if (!is_resolve && !connection_edge_is_rendezvous_stream(conn)) {
     addr = client_dns_lookup_entry(conn->socks_request->address);
     if (router_exit_policy_all_routers_reject(addr, conn->socks_request->port)) {
-      log_fn(LOG_WARN,"No Tor server exists that allows exit to %s:%d. Rejecting.",
+      log_fn(LOG_NOTICE,"No Tor server exists that allows exit to %s:%d. Rejecting.",
              conn->socks_request->address, conn->socks_request->port);
       return -1;
     }
@@ -824,7 +824,7 @@
 
   conn_age = time(NULL) - conn->timestamp_created;
   if (conn_age > CONN_AP_MAX_ATTACH_DELAY) {
-    log_fn(LOG_WARN,"Giving up on unattached conn (%d sec old).", conn_age);
+    log_fn(LOG_NOTICE,"Giving up on unattached conn (%d sec old).", conn_age);
     return -1;
   }
 

Index: connection.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.309
retrieving revision 1.310
diff -u -d -r1.309 -r1.310
--- connection.c	7 Dec 2004 16:37:32 -0000	1.309
+++ connection.c	13 Dec 2004 00:44:38 -0000	1.310
@@ -200,7 +200,7 @@
 
   if (conn->type == CONN_TYPE_AP || conn->type == CONN_TYPE_EXIT) {
     if (!conn->has_sent_end)
-      log_fn(LOG_WARN,"Edge connection hasn't sent end yet? Bug.");
+      log_fn(LOG_WARN,"Bug: Edge connection hasn't sent end yet?");
   }
 
   switch (conn->type) {
@@ -266,7 +266,7 @@
 {
   assert_connection_ok(conn,0);
   if (conn->s < 0) {
-    log_fn(LOG_WARN,"Attempt to close already-closed connection.");
+    log_fn(LOG_WARN,"Bug: Attempt to close already-closed connection.");
     return;
   }
   if (conn->outbuf_flushlen) {
@@ -290,7 +290,7 @@
   assert_connection_ok(conn,0);
 
   if (conn->marked_for_close) {
-    log(LOG_WARN, "Double mark-for-close on connection.");
+    log(LOG_WARN, "Bug: Double mark-for-close on connection.");
     return -1;
   }
 
@@ -326,7 +326,7 @@
     if (conn->hold_open_until_flushed) {
       tor_assert(conn->marked_for_close);
       if (now - conn->timestamp_lastwritten >= 15) {
-        log_fn(LOG_WARN,"Giving up on marked_for_close conn that's been flushing for 15s (fd %d, type %s, state %d).",
+        log_fn(LOG_NOTICE,"Giving up on marked_for_close conn that's been flushing for 15s (fd %d, type %s, state %d).",
                conn->s, CONN_TYPE_TO_STRING(conn->type), conn->state);
         conn->hold_open_until_flushed = 0;
       }
@@ -429,7 +429,7 @@
     if (ERRNO_IS_ACCEPT_EAGAIN(e)) {
       return 0; /* he hung up before we could accept(). that's fine. */
     } else if (ERRNO_IS_ACCEPT_RESOURCE_LIMIT(e)) {
-      log_fn(LOG_WARN,"accept failed: %s. Dropping incoming connection.",
+      log_fn(LOG_NOTICE,"accept failed: %s. Dropping incoming connection.",
              tor_socket_strerror(e));
       return 0;
     }
@@ -447,7 +447,7 @@
   if (new_type == CONN_TYPE_AP) {
     /* check sockspolicy to see if we should accept it */
     if (socks_policy_permits_address(ntohl(remote.sin_addr.s_addr)) == 0) {
-      log_fn(LOG_WARN,"Denying socks connection from untrusted address %s.",
+      log_fn(LOG_NOTICE,"Denying socks connection from untrusted address %s.",
              inet_ntoa(remote.sin_addr));
       tor_close_socket(news);
       return 0;
@@ -456,7 +456,7 @@
   if (new_type == CONN_TYPE_DIR) {
     /* check dirpolicy to see if we should accept it */
     if (dir_policy_permits_address(ntohl(remote.sin_addr.s_addr)) == 0) {
-      log_fn(LOG_WARN,"Denying dir connection from address %s.",
+      log_fn(LOG_NOTICE,"Denying dir connection from address %s.",
              inet_ntoa(remote.sin_addr));
       tor_close_socket(news);
       return 0;
@@ -650,7 +650,7 @@
       return 0;
 
     /* Otherwise, warn the user and relaunch. */
-    log_fn(LOG_WARN,"We have %d %s(s) open, but we want %d; relaunching.",
+    log_fn(LOG_NOTICE,"We have %d %s(s) open, but we want %d; relaunching.",
            have, conn_type_to_string[type], want);
   }
 
@@ -1329,7 +1329,7 @@
     case CONN_TYPE_CONTROL:
       return connection_control_process_inbuf(conn);
     default:
-      log_fn(LOG_WARN,"got unexpected conn type %d.", conn->type);
+      log_fn(LOG_WARN,"Bug: got unexpected conn type %d.", conn->type);
       return -1;
   }
 }
@@ -1361,7 +1361,7 @@
     case CONN_TYPE_CONTROL:
       return connection_control_finished_flushing(conn);
     default:
-      log_fn(LOG_WARN,"got unexpected conn type %d.", conn->type);
+      log_fn(LOG_WARN,"Bug: got unexpected conn type %d.", conn->type);
       return -1;
   }
 }
@@ -1384,7 +1384,7 @@
     case CONN_TYPE_DIR:
       return connection_dir_finished_connecting(conn);
     default:
-      log_fn(LOG_WARN,"got unexpected conn type %d.", conn->type);
+      log_fn(LOG_WARN,"Bug: got unexpected conn type %d.", conn->type);
       return -1;
   }
 }
@@ -1406,7 +1406,7 @@
     case CONN_TYPE_CONTROL:
       return connection_control_reached_eof(conn);
     default:
-      log_fn(LOG_WARN,"got unexpected conn type %d.", conn->type);
+      log_fn(LOG_WARN,"Bug: got unexpected conn type %d.", conn->type);
       return -1;
   }
 }

Index: connection_edge.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection_edge.c,v
retrieving revision 1.263
retrieving revision 1.264
diff -u -d -r1.263 -r1.264
--- connection_edge.c	7 Dec 2004 21:57:37 -0000	1.263
+++ connection_edge.c	13 Dec 2004 00:44:38 -0000	1.264
@@ -92,7 +92,7 @@
                       conn_state_to_string[conn->type][conn->state]);
       return 0;
   }
-  log_fn(LOG_WARN,"Got unexpected state %d. Closing.",conn->state);
+  log_fn(LOG_WARN,"Bug: Got unexpected state %d. Closing.",conn->state);
   connection_edge_end(conn, END_STREAM_REASON_MISC, conn->cpath_layer);
   connection_mark_for_close(conn);
   return -1;
@@ -130,7 +130,7 @@
   circuit_t *circ;
 
   if (conn->has_sent_end) {
-    log_fn(LOG_WARN,"It appears I've already sent the end. Are you calling me twice?");
+    log_fn(LOG_WARN,"Bug: Calling connection_edge_end on an already ended stream?");
     return -1;
   }
 
@@ -252,14 +252,14 @@
       continue;
     circ = circuit_get_by_conn(conn);
     if (!circ) { /* it's vanished? */
-      log_fn(LOG_WARN,"Conn is waiting (address %s), but lost its circ.",
+      log_fn(LOG_INFO,"Conn is waiting (address %s), but lost its circ.",
              conn->socks_request->address);
       connection_mark_for_close(conn);
       continue;
     }
     if (circ->purpose == CIRCUIT_PURPOSE_C_REND_JOINED) {
       if (now - conn->timestamp_lastread > 45) {
-        log_fn(LOG_WARN,"Rend stream is %d seconds late. Giving up on address '%s'.",
+        log_fn(LOG_NOTICE,"Rend stream is %d seconds late. Giving up on address '%s'.",
                (int)(now - conn->timestamp_lastread), conn->socks_request->address);
         connection_edge_end(conn, END_STREAM_REASON_TIMEOUT, conn->cpath_layer);
         connection_mark_for_close(conn);
@@ -269,7 +269,7 @@
     tor_assert(circ->purpose == CIRCUIT_PURPOSE_C_GENERAL);
     log_fn(LOG_NOTICE,"Stream is %d seconds late on address '%s'. Retrying.",
            (int)(now - conn->timestamp_lastread), conn->socks_request->address);
-    circuit_log_path(LOG_WARN, circ);
+    circuit_log_path(LOG_NOTICE, circ);
     /* send an end down the circuit */
     connection_edge_end(conn, END_STREAM_REASON_TIMEOUT, conn->cpath_layer);
     /* un-mark it as ending, since we're going to reuse it */
@@ -406,7 +406,7 @@
     }
 
     if (socks->command == SOCKS_COMMAND_CONNECT && socks->port == 0) {
-      log_fn(LOG_WARN,"Application asked to connect to port 0. Refusing.");
+      log_fn(LOG_NOTICE,"Application asked to connect to port 0. Refusing.");
       return -1;
     }
     conn->state = AP_CONN_STATE_CIRCUIT_WAIT;
@@ -958,7 +958,7 @@
 
   conn->state = EXIT_CONN_STATE_OPEN;
   if (connection_wants_to_flush(conn)) { /* in case there are any queued data cells */
-    log_fn(LOG_WARN,"tell roger: newly connected conn had data waiting!");
+    log_fn(LOG_WARN,"Bug: newly connected conn had data waiting!");
 //    connection_start_writing(conn);
   }
   connection_watch_events(conn, POLLIN);
@@ -1066,7 +1066,7 @@
   else if (a==0)
     return 1;
   tor_assert(a==1);
-  log_fn(LOG_WARN, "Got unexpected 'maybe' answer from socks policy");
+  log_fn(LOG_WARN, "Bug: Got unexpected 'maybe' answer from socks policy");
   return 0;
 }
 

Index: connection_or.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection_or.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- connection_or.c	29 Nov 2004 22:25:30 -0000	1.149
+++ connection_or.c	13 Dec 2004 00:44:38 -0000	1.150
@@ -210,7 +210,7 @@
 
   if (server_mode(get_options()) && (me=router_get_my_routerinfo()) &&
       !memcmp(me->identity_digest, id_digest,DIGEST_LEN)) {
-    log_fn(LOG_WARN,"Request to connect to myself! Failing.");
+    log_fn(LOG_WARN,"Bug: Request to connect to myself! Failing.");
     return NULL;
   }
 
@@ -403,7 +403,7 @@
   if (connection_or_nonopen_was_started_here(conn)) {
     /* I initiated this connection. */
     if (strcasecmp(conn->nickname, nickname)) {
-      log_fn(options->DirPort ? LOG_WARN : LOG_INFO,
+      log_fn(authdir_mode(options) ? LOG_WARN : LOG_INFO,
              "Other side (%s:%d) is '%s', but we tried to connect to '%s'",
              conn->address, conn->port, nickname, conn->nickname);
       control_event_or_conn_status(conn, OR_CONN_EVENT_FAILED);

Index: control.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/control.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- control.c	7 Dec 2004 19:36:43 -0000	1.34
+++ control.c	13 Dec 2004 00:44:38 -0000	1.35
@@ -572,7 +572,7 @@
 control_event_logmsg(int severity, const char *msg)
 {
   size_t len;
-  if (severity > LOG_WARN) /* Less important than warning? ignore for now. */
+  if (severity > LOG_NOTICE) /* Less important than notice? ignore for now. */
     return;
   if (!EVENT_IS_INTERESTING(EVENT_WARNING))
     return;

Index: directory.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -d -r1.180 -r1.181
--- directory.c	8 Dec 2004 00:42:50 -0000	1.180
+++ directory.c	13 Dec 2004 00:44:38 -0000	1.181
@@ -102,7 +102,7 @@
   else if (a==0)
     return 1;
   tor_assert(a==1);
-  log_fn(LOG_WARN, "Got unexpected 'maybe' answer from dir policy");
+  log_fn(LOG_WARN, "Bug: got unexpected 'maybe' answer from dir policy");
   return 0;
 }
 
@@ -764,7 +764,7 @@
     tor_free(url);
 
     if (dlen == 0) {
-      log_fn(LOG_WARN,"My directory is empty. Closing.");
+      log_fn(LOG_NOTICE,"My directory is empty. Closing.");
       connection_write_to_buf(answer503, strlen(answer503), conn);
       return 0;
     }
@@ -967,7 +967,7 @@
       connection_mark_for_close(conn);
       return 0;
     default:
-      log_fn(LOG_WARN,"BUG: called in unexpected state %d.", conn->state);
+      log_fn(LOG_WARN,"Bug: called in unexpected state %d.", conn->state);
       return -1;
   }
   return 0;

Index: dirserv.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -d -r1.128 -r1.129
--- dirserv.c	1 Dec 2004 03:48:13 -0000	1.128
+++ dirserv.c	13 Dec 2004 00:44:38 -0000	1.129
@@ -111,19 +111,19 @@
   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 @@
     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 @@
   /* 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 @@
       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.");
       }
     }
   }

Index: dns.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/dns.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- dns.c	6 Dec 2004 23:19:55 -0000	1.125
+++ dns.c	13 Dec 2004 00:44:38 -0000	1.126
@@ -117,7 +117,7 @@
     resolve = oldest_cached_resolve;
     log(LOG_DEBUG,"Forgetting old cached resolve (expires %lu)", (unsigned long)resolve->expire);
     if (resolve->state == CACHE_STATE_PENDING) {
-      log_fn(LOG_WARN,"Expiring a dns resolve that's still pending. Forgot to cull it?");
+      log_fn(LOG_WARN,"Bug: Expiring a dns resolve that's still pending. Forgot to cull it?");
     }
     if (resolve->pending_connections) {
       log_fn(LOG_WARN, "Closing pending connections on expiring DNS resolve!");
@@ -316,7 +316,7 @@
 
   resolve = SPLAY_FIND(cache_tree, &cache_root, &search);
   if (!resolve) {
-    log_fn(LOG_WARN,"Address '%s' is not pending. Dropping.", conn->address);
+    log_fn(LOG_NOTICE,"Address '%s' is not pending. Dropping.", conn->address);
     return;
   }
 
@@ -392,7 +392,7 @@
 
   resolve = SPLAY_FIND(cache_tree, &cache_root, &search);
   if (!resolve) {
-    log_fn(LOG_WARN,"Address '%s' is not pending. Dropping.", address);
+    log_fn(LOG_NOTICE,"Address '%s' is not pending. Dropping.", address);
     return;
   }
 
@@ -475,7 +475,7 @@
   if (resolve->state != CACHE_STATE_PENDING) {
     /* XXXX Maybe update addr? or check addr for consistency? Or let
      * VALID replace FAILED? */
-    log_fn(LOG_WARN, "Resolved '%s' which was already resolved; ignoring",
+    log_fn(LOG_NOTICE, "Resolved '%s' which was already resolved; ignoring",
            address);
     tor_assert(resolve->pending_connections == NULL);
     return;
@@ -784,7 +784,7 @@
 
   while (num_dnsworkers > num_dnsworkers_busy+MAX_IDLE_DNSWORKERS) { /* too many idle? */
     /* cull excess workers */
-    log_fn(LOG_WARN,"%d of %d dnsworkers are idle. Killing one.",
+    log_fn(LOG_NOTICE,"%d of %d dnsworkers are idle. Killing one.",
            num_dnsworkers-num_dnsworkers_needed, num_dnsworkers);
     dnsconn = connection_get_by_type_state(CONN_TYPE_DNSWORKER, DNSWORKER_STATE_IDLE);
     tor_assert(dnsconn);

Index: hibernate.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/hibernate.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- hibernate.c	8 Dec 2004 12:30:20 -0000	1.39
+++ hibernate.c	13 Dec 2004 00:44:38 -0000	1.40
@@ -765,7 +765,7 @@
   }
 }
 
-/** The big function. Consider our environment and decide if it's time
+/** Consider our environment and decide if it's time
  * to start/stop hibernating.
  */
 void consider_hibernation(time_t now) {

Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.404
retrieving revision 1.405
diff -u -d -r1.404 -r1.405
--- main.c	13 Dec 2004 00:09:00 -0000	1.404
+++ main.c	13 Dec 2004 00:44:39 -0000	1.405
@@ -270,7 +270,7 @@
       connection_handle_read(conn) < 0) {
     if (!conn->marked_for_close) {
       /* this connection is broken. remove it */
-      log_fn(LOG_WARN,"Unhandled error on read for %s connection (fd %d); removing",
+      log_fn(LOG_WARN,"Bug: unhandled error on read for %s connection (fd %d); removing",
              CONN_TYPE_TO_STRING(conn->type), conn->s);
       connection_mark_for_close(conn);
     }
@@ -300,7 +300,7 @@
   if (connection_handle_write(conn) < 0) {
     if (!conn->marked_for_close) {
       /* this connection is broken. remove it. */
-      log_fn(LOG_WARN,"Unhandled error on write for %s connection (fd %d); removing",
+      log_fn(LOG_WARN,"Bug: unhandled error on write for %s connection (fd %d); removing",
              CONN_TYPE_TO_STRING(conn->type), conn->s);
       conn->has_sent_end = 1; /* otherwise we cry wolf about duplicate close */
       /* XXX do we need a close-immediate here, so we don't try to flush? */
@@ -355,7 +355,7 @@
       return;
     }
     if (connection_wants_to_flush(conn)) {
-      log_fn(LOG_WARN,"Conn (addr %s, fd %d, type %s, state %d) still wants to flush. Losing %d bytes! (Marked at %s:%d)",
+      log_fn(LOG_NOTICE,"Conn (addr %s, fd %d, type %s, state %d) still wants to flush. Losing %d bytes! (Marked at %s:%d)",
              conn->address, conn->s, CONN_TYPE_TO_STRING(conn->type), conn->state,
              (int)buf_datalen(conn->outbuf), conn->marked_for_close_file,
              conn->marked_for_close);
@@ -563,6 +563,7 @@
     if (tor_tls_context_new(get_identity_key(), 1, options->Nickname,
                             MAX_SSL_KEY_LIFETIME) < 0) {
       log_fn(LOG_WARN, "Error reinitializing TLS context");
+      /* XXX is it a bug here, that we just keep going? */
     }
     last_rotated_certificate = now;
     /* XXXX We should rotate TLS connections as well; this code doesn't change
@@ -761,7 +762,7 @@
     tor_snprintf(keydir,sizeof(keydir),"%s/approved-routers", options->DataDirectory);
     log_fn(LOG_INFO,"Reloading approved fingerprints from %s...",keydir);
     if (dirserv_parse_fingerprint_file(keydir) < 0) {
-      log_fn(LOG_WARN, "Error reloading fingerprints. Continuing with old list.");
+      log_fn(LOG_NOTICE, "Error reloading fingerprints. Continuing with old list.");
     }
   }
   /* Fetch a new directory. Even authdirservers do this. */

Index: onion.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/onion.c,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -d -r1.172 -r1.173
--- onion.c	29 Nov 2004 22:25:30 -0000	1.172
+++ onion.c	13 Dec 2004 00:44:39 -0000	1.173
@@ -46,7 +46,7 @@
   tor_assert(!ol_tail->next);
 
   if (ol_length >= get_options()->MaxOnionsPending) {
-    log_fn(LOG_WARN,"Already have %d onions queued. Closing.", ol_length);
+    log_fn(LOG_NOTICE,"Already have %d onions queued. Closing.", ol_length);
     tor_free(tmp);
     return -1;
   }

Index: relay.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/relay.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- relay.c	7 Dec 2004 15:31:54 -0000	1.30
+++ relay.c	13 Dec 2004 00:44:39 -0000	1.31
@@ -525,7 +525,7 @@
         return 0; /* this circuit is screwed and doesn't know it yet */
       }
       if (connection_ap_can_use_exit(conn, exitrouter)) {
-        log_fn(LOG_WARN,"Exitrouter %s seems to be more restrictive than its exit policy. Not using this router as exit for now,", exitrouter->nickname);
+        log_fn(LOG_NOTICE,"Exitrouter %s seems to be more restrictive than its exit policy. Not using this router as exit for now,", exitrouter->nickname);
         addr_policy_free(exitrouter->exit_policy);
         exitrouter->exit_policy =
           router_parse_addr_policy_from_string("reject *:*");
@@ -555,7 +555,7 @@
         /* else, conn will get closed below */
         log_fn(LOG_INFO,"Giving up on retrying (from resolvefailed); conn can't be handled.");
       } else {
-        log_fn(LOG_WARN,"Have tried resolving address %s at %d different places. Giving up.",
+        log_fn(LOG_NOTICE,"Have tried resolving address %s at %d different places. Giving up.",
                conn->socks_request->address, MAX_RESOLVE_FAILURES);
       }
     }