diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-10-25 18:01:01 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-10-25 18:01:01 +0000 |
commit | 5d85560d9e23147f85847f69a6255edfb432f565 (patch) | |
tree | d45c170eefd08fd50cbe65d58746288a310cd66b | |
parent | d7e136240a59f75985b1b752b07564150ea1acb4 (diff) | |
download | tor-5d85560d9e23147f85847f69a6255edfb432f565.tar tor-5d85560d9e23147f85847f69a6255edfb432f565.tar.gz |
Remove last vestiges of old logging interface.
svn:r5317
-rw-r--r-- | src/common/log.h | 14 | ||||
-rw-r--r-- | src/common/util.h | 11 | ||||
-rw-r--r-- | src/or/buffers.c | 1 | ||||
-rw-r--r-- | src/or/circuitbuild.c | 1 | ||||
-rw-r--r-- | src/or/circuitlist.c | 1 | ||||
-rw-r--r-- | src/or/circuituse.c | 1 | ||||
-rw-r--r-- | src/or/command.c | 1 | ||||
-rw-r--r-- | src/or/config.c | 1 | ||||
-rw-r--r-- | src/or/connection.c | 1 | ||||
-rw-r--r-- | src/or/connection_edge.c | 1 | ||||
-rw-r--r-- | src/or/connection_or.c | 1 | ||||
-rw-r--r-- | src/or/control.c | 1 | ||||
-rw-r--r-- | src/or/cpuworker.c | 1 | ||||
-rw-r--r-- | src/or/directory.c | 1 | ||||
-rw-r--r-- | src/or/dirserv.c | 1 | ||||
-rw-r--r-- | src/or/dns.c | 1 | ||||
-rw-r--r-- | src/or/hibernate.c | 1 | ||||
-rw-r--r-- | src/or/main.c | 1 | ||||
-rw-r--r-- | src/or/onion.c | 1 | ||||
-rw-r--r-- | src/or/or.h | 3 | ||||
-rw-r--r-- | src/or/relay.c | 1 | ||||
-rw-r--r-- | src/or/rendclient.c | 1 | ||||
-rw-r--r-- | src/or/rendcommon.c | 1 | ||||
-rw-r--r-- | src/or/rendmid.c | 1 | ||||
-rw-r--r-- | src/or/rendservice.c | 1 | ||||
-rw-r--r-- | src/or/rephist.c | 1 | ||||
-rw-r--r-- | src/or/router.c | 1 | ||||
-rw-r--r-- | src/or/routerlist.c | 1 | ||||
-rw-r--r-- | src/or/routerparse.c | 1 | ||||
-rw-r--r-- | src/or/test.c | 1 |
30 files changed, 3 insertions, 52 deletions
diff --git a/src/common/log.h b/src/common/log.h index 20b0e689c..eec031f1a 100644 --- a/src/common/log.h +++ b/src/common/log.h @@ -114,6 +114,7 @@ void change_callback_log_severity(int loglevelMin, int loglevelMax, /* Outputs a message to stdout */ void _log(int severity, unsigned int domain, const char *format, ...) CHECK_PRINTF(3,4); +#define log _log /* hack it so we don't conflict with log() as much */ #ifdef __GNUC__ void _log_fn(int severity, unsigned int domain, @@ -121,16 +122,8 @@ void _log_fn(int severity, unsigned int domain, CHECK_PRINTF(4,5); /** Log a message at level <b>severity</b>, using a pretty-printed version * of the current function name. */ -#ifdef OLD_LOG_INTERFACE -#define log_fn(severity, args...) \ - _log_fn(severity, LD_GENERAL, __PRETTY_FUNCTION__, args) -#define log(severity, args...) \ - _log(severity, LD_GENERAL, args) -#else #define log_fn(severity, domain, args...) \ _log_fn(severity, domain, __PRETTY_FUNCTION__, args) -#define log _log -#endif #define debug(domain, args...) \ _log_fn(LOG_DEBUG, domain, __PRETTY_FUNCTION__, args) #define info(domain, args...) \ @@ -141,7 +134,8 @@ void _log_fn(int severity, unsigned int domain, _log_fn(LOG_WARN, domain, __PRETTY_FUNCTION__, args) #define err(domain, args...) \ _log_fn(LOG_ERR, domain, __PRETTY_FUNCTION__, args) -#else + +#else /* ! defined(__GNUC__) */ void _log_fn(int severity, unsigned int domain, const char *format, ...); void _debug(unsigned int domain, const char *format, ...); @@ -150,8 +144,6 @@ void _notice(unsigned int domain, const char *format, ...); void _warn(unsigned int domain, const char *format, ...); void _err(unsigned int domain, const char *format, ...); -#define log _log /* hack it so we don't conflict with log() as much */ - #if defined(_MSC_VER) && _MSC_VER < 1300 /* MSVC 6 and earlier don't have __FUNCTION__, or even __LINE__. */ #define log_fn _log_fn diff --git a/src/common/util.h b/src/common/util.h index c80bbd666..969d6152e 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -38,16 +38,6 @@ */ #error "Sorry; we don't support building with NDEBUG." #else -#ifdef OLD_LOG_INTERFACE -#define tor_assert(expr) do { \ - if (!(expr)) { \ - log(LOG_ERR, "%s:%d: %s: Assertion %s failed; aborting.", \ - _SHORT_FILE_, __LINE__, __FUNCTION__, #expr); \ - fprintf(stderr,"%s:%d %s: Assertion %s failed; aborting.\n", \ - _SHORT_FILE_, __LINE__, __FUNCTION__, #expr); \ - abort(); /* unreached */ \ - } } while (0) -#else #define tor_assert(expr) do { \ if (!(expr)) { \ log(LOG_ERR, LD_BUG, "%s:%d: %s: Assertion %s failed; aborting.", \ @@ -57,7 +47,6 @@ abort(); /* unreached */ \ } } while (0) #endif -#endif #ifdef USE_DMALLOC #define DMALLOC_PARAMS , const char *file, const int line diff --git a/src/or/buffers.c b/src/or/buffers.c index 2a470ce44..30212e33d 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -12,7 +12,6 @@ const char buffers_c_id[] = "$Id$"; * memory, file descriptors, or TLS connections. **/ -#define NEW_LOG_INTERFACE #include "or.h" #define SENTINELS diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 3ea2bdc23..92b2ee7e6 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -10,7 +10,6 @@ const char circuitbuild_c_id[] = "$Id$"; * \brief The actual details of building circuits. **/ -#define NEW_LOG_INTERFACE #include "or.h" /********* START VARIABLES **********/ diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 1996cccce..abe083d31 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -10,7 +10,6 @@ const char circuitlist_c_id[] = "$Id$"; * \brief Manage the global circuit list. **/ -#define NEW_LOG_INTERFACE #include "or.h" /* Define RB_AUGMENT to avoid warnings about if statements with emtpy bodies. diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 8c98d7e30..cff944a94 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -10,7 +10,6 @@ const char circuituse_c_id[] = "$Id$"; * \brief Launch the right sort of circuits and attach streams to them. **/ -#define NEW_LOG_INTERFACE #include "or.h" /** Longest time to wait for a circuit before closing an AP connection */ diff --git a/src/or/command.c b/src/or/command.c index 63d067ae6..2c971734c 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -16,7 +16,6 @@ const char command_c_id[] = "$Id$"; * connection_or_process_cells_from_inbuf() in connection_or.c */ -#define NEW_LOG_INTERFACE #include "or.h" /** Keep statistics about how many of each type of cell we've received. */ diff --git a/src/or/config.c b/src/or/config.c index 878fcac4a..78c3a9cb6 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -10,7 +10,6 @@ const char config_c_id[] = "$Id$"; * \brief Code to parse and interpret configuration files. **/ -#define NEW_LOG_INTERFACE #include "or.h" #ifdef MS_WINDOWS #include <shlobj.h> diff --git a/src/or/connection.c b/src/or/connection.c index 257efbbb1..893a9c760 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -11,7 +11,6 @@ const char connection_c_id[] = "$Id$"; * on connections. **/ -#define NEW_LOG_INTERFACE #include "or.h" static connection_t *connection_create_listener(const char *listenaddress, diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index b0620205d..4da992d68 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -10,7 +10,6 @@ const char connection_edge_c_id[] = "$Id$"; * \brief Handle edge streams. **/ -#define NEW_LOG_INTERFACE #include "or.h" #include "tree.h" diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 7e3f8e8e0..ba813c434 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -11,7 +11,6 @@ const char connection_or_c_id[] = "$Id$"; * cells on the network. **/ -#define NEW_LOG_INTERFACE #include "or.h" /** How much clock skew do we tolerate when checking certificates for diff --git a/src/or/control.c b/src/or/control.c index a2d8079d9..e1cd8afcd 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -8,7 +8,6 @@ const char control_c_id[] = "$Id$"; * \brief Implementation for Tor's control-socket interface. **/ -#define NEW_LOG_INTERFACE #include "or.h" #define STATE_IS_OPEN(s) ((s) == CONTROL_CONN_STATE_OPEN_V0 || \ diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index a6bb9d932..cfd578e49 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -13,7 +13,6 @@ const char cpuworker_c_id[] = "$Id$"; * Right now, we only use this for processing onionskins. **/ -#define NEW_LOG_INTERFACE #include "or.h" /** The maximum number of cpuworker processes we will keep around. */ diff --git a/src/or/directory.c b/src/or/directory.c index 198b95f0c..2a45b5f16 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -4,7 +4,6 @@ /* $Id$ */ const char directory_c_id[] = "$Id$"; -#define NEW_LOG_INTERFACE #include "or.h" /** diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 5a13b151c..15244a8f0 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -4,7 +4,6 @@ /* $Id$ */ const char dirserv_c_id[] = "$Id$"; -#define NEW_LOG_INTERFACE #include "or.h" /** diff --git a/src/or/dns.c b/src/or/dns.c index 2cd64acc7..da51ec57b 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -17,7 +17,6 @@ const char dns_c_id[] = "$Id$"; * them becomes more commonly available. */ -#define NEW_LOG_INTERFACE #include "or.h" #include "tree.h" diff --git a/src/or/hibernate.c b/src/or/hibernate.c index 337b16b9d..77e198d15 100644 --- a/src/or/hibernate.c +++ b/src/or/hibernate.c @@ -22,7 +22,6 @@ hibernating, phase 2: - close all OR/AP/exit conns) */ -#define NEW_LOG_INTERFACE #include "or.h" #define HIBERNATE_STATE_LIVE 1 diff --git a/src/or/main.c b/src/or/main.c index 9966a825a..7e155d145 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -11,7 +11,6 @@ const char main_c_id[] = "$Id$"; * connections, implements main loop, and drives scheduled events. **/ -#define NEW_LOG_INTERFACE #include "or.h" #ifdef USE_DMALLOC #include <dmalloc.h> diff --git a/src/or/onion.c b/src/or/onion.c index 05f3df543..cb65b9359 100644 --- a/src/or/onion.c +++ b/src/or/onion.c @@ -11,7 +11,6 @@ const char onion_c_id[] = "$Id$"; * parsing and creation. **/ -#define NEW_LOG_INTERFACE #include "or.h" /** Type for a linked list of circuits that are waiting for a free CPU worker diff --git a/src/or/or.h b/src/or/or.h index 9472b109f..dfe43ecb1 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -133,9 +133,6 @@ #include "../common/crypto.h" #include "../common/tortls.h" -#ifndef NEW_LOG_INTERFACE -#define OLD_LOG_INTERFACE -#endif #include "../common/log.h" #include "../common/compat.h" #include "../common/container.h" diff --git a/src/or/relay.c b/src/or/relay.c index b03262c13..c838d7dd5 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -11,7 +11,6 @@ const char relay_c_id[] = "$Id$"; * receiving from circuits. **/ -#define NEW_LOG_INTERFACE #include "or.h" static int relay_crypt(circuit_t *circ, cell_t *cell, int cell_direction, diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 8f29f7378..fd1af57aa 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -8,7 +8,6 @@ const char rendclient_c_id[] = "$Id$"; * \brief Client code to access location-hidden services. **/ -#define NEW_LOG_INTERFACE #include "or.h" /** Called when we've established a circuit to an introduction point: diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index 3703e5c97..784a56a3d 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -9,7 +9,6 @@ const char rendcommon_c_id[] = "$Id$"; * introducers, services, clients, and rendezvous points. **/ -#define NEW_LOG_INTERFACE #include "or.h" /** Return 0 if one and two are the same service ids, else -1 or 1 */ diff --git a/src/or/rendmid.c b/src/or/rendmid.c index fdd70bdc4..cc4ca60d2 100644 --- a/src/or/rendmid.c +++ b/src/or/rendmid.c @@ -8,7 +8,6 @@ const char rendmid_c_id[] = "$Id$"; * \brief Implement introductions points and rendezvous points. **/ -#define NEW_LOG_INTERFACE #include "or.h" /** Respond to an ESTABLISH_INTRO cell by checking the signed data and diff --git a/src/or/rendservice.c b/src/or/rendservice.c index d5d6e1aef..5982c18e8 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -8,7 +8,6 @@ const char rendservice_c_id[] = "$Id$"; * \brief The hidden-service side of rendezvous functionality. **/ -#define NEW_LOG_INTERFACE #include "or.h" static circuit_t *find_intro_circuit(routerinfo_t *router, const char *pk_digest); diff --git a/src/or/rephist.c b/src/or/rephist.c index 18de290a2..b7a193b29 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -10,7 +10,6 @@ const char rephist_c_id[] = "$Id$"; * been using, which ports we tend to want, and so on. **/ -#define NEW_LOG_INTERFACE #include "or.h" static void bw_arrays_init(void); diff --git a/src/or/router.c b/src/or/router.c index 3531d9024..da741a2cf 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -5,7 +5,6 @@ /* $Id$ */ const char router_c_id[] = "$Id$"; -#define NEW_LOG_INTERFACE #include "or.h" /** diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 3cd9bcd4e..9d4fd8874 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -12,7 +12,6 @@ const char routerlist_c_id[] = "$Id$"; * servers. **/ -#define NEW_LOG_INTERFACE #include "or.h" /****************************************************************************/ diff --git a/src/or/routerparse.c b/src/or/routerparse.c index fe4ec89f1..4321f6743 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -10,7 +10,6 @@ const char routerparse_c_id[] = "$Id$"; * \brief Code to parse and validate router descriptors and directories. **/ -#define NEW_LOG_INTERFACE #include "or.h" /****************************************************************************/ diff --git a/src/or/test.c b/src/or/test.c index d9018e7fc..918278b9c 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -22,7 +22,6 @@ const char test_c_id[] = "$Id$"; #include <dirent.h> #endif -#define NEW_LOG_INTERFACE #include "or.h" #include "../common/test.h" #include "../common/torgzip.h" |