Loading src/common/log.h +3 −11 Original line number Diff line number Diff line Loading @@ -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, Loading @@ -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...) \ Loading @@ -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, ...); Loading @@ -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 Loading src/common/util.h +0 −11 Original line number Diff line number Diff line Loading @@ -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.", \ Loading @@ -57,7 +47,6 @@ abort(); /* unreached */ \ } } while (0) #endif #endif #ifdef USE_DMALLOC #define DMALLOC_PARAMS , const char *file, const int line Loading src/or/buffers.c +0 −1 Original line number Diff line number Diff line Loading @@ -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 Loading src/or/circuitbuild.c +0 −1 Original line number Diff line number Diff line Loading @@ -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 **********/ Loading src/or/circuitlist.c +0 −1 Original line number Diff line number Diff line Loading @@ -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. Loading Loading
src/common/log.h +3 −11 Original line number Diff line number Diff line Loading @@ -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, Loading @@ -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...) \ Loading @@ -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, ...); Loading @@ -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 Loading
src/common/util.h +0 −11 Original line number Diff line number Diff line Loading @@ -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.", \ Loading @@ -57,7 +47,6 @@ abort(); /* unreached */ \ } } while (0) #endif #endif #ifdef USE_DMALLOC #define DMALLOC_PARAMS , const char *file, const int line Loading
src/or/buffers.c +0 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
src/or/circuitbuild.c +0 −1 Original line number Diff line number Diff line Loading @@ -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 **********/ Loading
src/or/circuitlist.c +0 −1 Original line number Diff line number Diff line Loading @@ -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. Loading