From 5d85560d9e23147f85847f69a6255edfb432f565 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 25 Oct 2005 18:01:01 +0000 Subject: Remove last vestiges of old logging interface. svn:r5317 --- src/common/log.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/common/log.h') diff --git a/src/common/log.h b/src/common/log.h index 20b0e689ca..eec031f1a0 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 severity, 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 -- cgit v1.2.3-54-g00ecf