diff options
author | Peter Palfrader <peter@palfrader.org> | 2009-09-03 15:19:37 +0200 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2009-09-03 15:19:37 +0200 |
commit | b440a4d9369c4a6c4501b289f2e6ff089ba9a519 (patch) | |
tree | 180932fa558b2fab3d984b0d64210bf8d1207179 /src/common/log.c | |
parent | 58ccdfccefb467fe453ec65e1cea90a6e7f729af (diff) | |
parent | 2bf59689a223fa026a2d2919f455ce100fe43480 (diff) | |
download | tor-b440a4d9369c4a6c4501b289f2e6ff089ba9a519.tar tor-b440a4d9369c4a6c4501b289f2e6ff089ba9a519.tar.gz |
Merge branch 'debian-merge' into debian
* debian-merge: (190 commits)
Forward port patches/06_add_compile_time_defaults.dpatch
Forward port patches/03_tor_manpage_in_section_8.dpatch
New upstream version
HiddenServiceVersion must be set to 2 currently.
put karsten's changelog in the right place
When Tor fails to parse a descriptor of any kind, dump it to disk.
update fetch-all with dir auth
changelog and spec changes for the .exit fix
bump to 0.2.2.1-alpha
typos in dir-spec
mark off a done proposal
clean up the changelog for 0.2.2.1-alpha
A changelog entry and a bit more documentation for socks-client
Clean up a couple of style issues in the socks-client branch.
new proposals: params in consensus, and lower circwindow
Add some fixes after discussion with Nick.
Refactor geoip_get_dirreq_history() some more.
Fix a memory leak in summarizing directory request timing.
Add the first 8 bytes of the git commit digest to our versions.
autoconf 2.59 appears not to support AC_PROG_SED
...
Diffstat (limited to 'src/common/log.c')
-rw-r--r-- | src/common/log.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/common/log.c b/src/common/log.c index a7b0c12c4..b12462a42 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -36,8 +36,6 @@ #include "log.h" #include "container.h" -#include <event.h> - #define TRUNCATED_STR "[...truncated]" #define TRUNCATED_STR_LEN 14 @@ -921,65 +919,6 @@ switch_logs_debug(void) UNLOCK_LOGS(); } -#ifdef HAVE_EVENT_SET_LOG_CALLBACK -/** A string which, if it appears in a libevent log, should be ignored. */ -static const char *suppress_msg = NULL; -/** Callback function passed to event_set_log() so we can intercept - * log messages from libevent. */ -static void -libevent_logging_callback(int severity, const char *msg) -{ - char buf[1024]; - size_t n; - if (suppress_msg && strstr(msg, suppress_msg)) - return; - n = strlcpy(buf, msg, sizeof(buf)); - if (n && n < sizeof(buf) && buf[n-1] == '\n') { - buf[n-1] = '\0'; - } - switch (severity) { - case _EVENT_LOG_DEBUG: - log(LOG_DEBUG, LD_NET, "Message from libevent: %s", buf); - break; - case _EVENT_LOG_MSG: - log(LOG_INFO, LD_NET, "Message from libevent: %s", buf); - break; - case _EVENT_LOG_WARN: - log(LOG_WARN, LD_GENERAL, "Warning from libevent: %s", buf); - break; - case _EVENT_LOG_ERR: - log(LOG_ERR, LD_GENERAL, "Error from libevent: %s", buf); - break; - default: - log(LOG_WARN, LD_GENERAL, "Message [%d] from libevent: %s", - severity, buf); - break; - } -} -/** Set hook to intercept log messages from libevent. */ -void -configure_libevent_logging(void) -{ - event_set_log_callback(libevent_logging_callback); -} -/** Ignore any libevent log message that contains <b>msg</b>. */ -void -suppress_libevent_log_msg(const char *msg) -{ - suppress_msg = msg; -} -#else -void -configure_libevent_logging(void) -{ -} -void -suppress_libevent_log_msg(const char *msg) -{ - (void)msg; -} -#endif - #if 0 static void dump_log_info(logfile_t *lf) |