summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-05-15 05:00:24 +0000
committerRoger Dingledine <arma@torproject.org>2005-05-15 05:00:24 +0000
commit28195a0eb140ef4be2e05c406eaa7a751d50db08 (patch)
treec01cd0105b60884ab22162e5a49091aae9ec5451
parent5837711b0abcb43a43fb2573df598f7cbc9b82ba (diff)
downloadtor-28195a0eb140ef4be2e05c406eaa7a751d50db08.tar.gz
tor-28195a0eb140ef4be2e05c406eaa7a751d50db08.zip
clean up some log entries
svn:r4228
-rw-r--r--src/or/circuitbuild.c6
-rw-r--r--src/or/circuituse.c9
-rw-r--r--src/or/config.c4
-rw-r--r--src/or/main.c4
4 files changed, 12 insertions, 11 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index ba342d433a..06e7cd09f7 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -489,10 +489,10 @@ int circuit_send_next_onion_skin(circuit_t *circ) {
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 @@ int circuit_send_next_onion_skin(circuit_t *circ) {
* 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();
}
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 94c8dedeb0..4743afbce2 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -816,7 +816,7 @@ circuit_get_open_circ_or_launch(connection_t *conn,
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 @@ circuit_get_open_circ_or_launch(connection_t *conn,
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 @@ try_an_intro_point:
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 @@ int connection_ap_handshake_attach_circuit(connection_t *conn) {
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;
}
diff --git a/src/or/config.c b/src/or/config.c
index 604bb7252d..c52208eee1 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -294,10 +294,10 @@ options_act(void) {
#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;
}
diff --git a/src/or/main.c b/src/or/main.c
index df3d9d9fc1..92dfdfefe5 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -849,7 +849,7 @@ static int do_hup(void) {
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 @@ static int tor_init(int argc, char *argv[]) {
/* 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.");