[or-cvs] clean up some log entries
Roger Dingledine
arma at seul.org
Sun May 15 05:00:26 UTC 2005
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 config.c main.c
Log Message:
clean up some log entries
Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -d -r1.113 -r1.114
--- circuitbuild.c 7 May 2005 05:55:06 -0000 1.113
+++ circuitbuild.c 15 May 2005 05:00:24 -0000 1.114
@@ -489,10 +489,10 @@
if (!has_completed_circuit) {
or_options_t *options = get_options();
has_completed_circuit=1;
- log_fn(LOG_NOTICE,"Tor has successfully opened a circuit. Looks like it's working.");
+ log(LOG_NOTICE,"Tor has successfully opened a circuit. Looks like it's working.");
/* XXX009 Log a count of known routers here */
if (server_mode(options) && !check_whether_orport_reachable())
- log_fn(LOG_NOTICE,"Now checking whether ORPort %s%s reachable... (this may take several minutes)",
+ log(LOG_NOTICE,"Now checking whether ORPort %s%s reachable... (this may take several minutes)",
options->DirPort ? "and DirPort " : "",
options->DirPort ? "are" : "is");
}
@@ -532,7 +532,7 @@
* something has also gone wrong with our network: notify the user,
* and abandon all not-yet-used circuits. */
void circuit_note_clock_jumped(int seconds_elapsed) {
- log_fn(LOG_NOTICE,"Your clock just jumped %d seconds forward; assuming established circuits no longer work.", seconds_elapsed);
+ log(LOG_NOTICE,"Your clock just jumped %d seconds forward; assuming established circuits no longer work.", seconds_elapsed);
has_completed_circuit=0; /* so it'll log when it works again */
circuit_mark_all_unused_circs();
}
Index: circuituse.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuituse.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- circuituse.c 3 May 2005 10:04:07 -0000 1.71
+++ circuituse.c 15 May 2005 05:00:24 -0000 1.72
@@ -816,7 +816,7 @@
if (!has_fetched_directory) {
if (!connection_get_by_type(CONN_TYPE_DIR)) {
- log_fn(LOG_NOTICE,"Application request when we're believed to be offline. Optimistically trying again.");
+ log(LOG_NOTICE,"Application request when we're believed to be offline. Optimistically trying again.");
directory_get_from_dirserver(DIR_PURPOSE_FETCH_DIR, NULL, 1);
}
/* the stream will be dealt with when has_fetched_directory becomes
@@ -837,7 +837,7 @@
addr = ntohl(in.s_addr);
if (router_exit_policy_all_routers_reject(addr, conn->socks_request->port,
need_uptime)) {
- log_fn(LOG_NOTICE,"No Tor server exists that allows exit to %s:%d. Rejecting.",
+ log(LOG_NOTICE,"No Tor server exists that allows exit to %s:%d. Rejecting.",
safe_str(conn->socks_request->address), conn->socks_request->port);
return -1;
}
@@ -862,7 +862,7 @@
return 0;
}
if (!router_get_by_nickname(exitname)) {
- log_fn(LOG_NOTICE,"Advertised intro point '%s' is not recognized for '%s'. Skipping over.",
+ log_fn(LOG_NOTICE,"Advertised intro point '%s' is not recognized for hidserv address '%s'. Skipping over.",
exitname, safe_str(conn->rend_query));
rend_client_remove_intro_point(exitname, conn->rend_query);
tor_free(exitname);
@@ -1034,7 +1034,8 @@
conn_age = time(NULL) - conn->timestamp_created;
if (conn_age > CONN_AP_MAX_ATTACH_DELAY) {
- log_fn(LOG_NOTICE,"Giving up on unattached conn (%d sec old).", conn_age);
+ log(LOG_NOTICE,"Tried for %d seconds to get a connection to %s:%d. Giving up.",
+ conn_age, safe_str(conn->socks_request->address), conn->socks_request->port);
return -1;
}
Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.346
retrieving revision 1.347
diff -u -d -r1.346 -r1.347
--- config.c 15 May 2005 02:05:45 -0000 1.346
+++ config.c 15 May 2005 05:00:24 -0000 1.347
@@ -294,10 +294,10 @@
#if defined(HAVE_EVENT_GET_VERSION) && defined(HAVE_EVENT_GET_METHOD)
/* Making this a NOTICE for now so we can link bugs to a libevent versions
* or methods better. */
- log_fn(LOG_NOTICE, "Initialized libevent version %s using method %s",
+ log(LOG_NOTICE, "Initialized libevent version %s using method %s",
event_get_version(), event_get_method());
#else
- log_fn(LOG_NOTICE, "Initialized old libevent (version 1.0b or earlier)");
+ log(LOG_NOTICE, "Initialized old libevent (version 1.0b or earlier)");
#endif
libevent_initialized = 1;
}
Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.495
retrieving revision 1.496
diff -u -d -r1.495 -r1.496
--- main.c 14 May 2005 01:11:45 -0000 1.495
+++ main.c 15 May 2005 05:00:24 -0000 1.496
@@ -849,7 +849,7 @@
char keydir[512];
or_options_t *options = get_options();
- log_fn(LOG_NOTICE,"Received sighup. Reloading config.");
+ log(LOG_NOTICE,"Received sighup. Reloading config.");
has_completed_circuit=0;
if (accounting_is_enabled(options))
accounting_record_bandwidth_usage(time(NULL));
@@ -1195,7 +1195,7 @@
/* give it somewhere to log to initially */
add_temp_log();
- log_fn(LOG_NOTICE,"Tor v%s. This is experimental software. Do not rely on it for strong anonymity.",VERSION);
+ log(LOG_NOTICE,"Tor v%s. This is experimental software. Do not rely on it for strong anonymity.",VERSION);
if (network_init()<0) {
log_fn(LOG_ERR,"Error initializing network; exiting.");
More information about the tor-commits
mailing list