X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/c9467b7a34160c4e25580a2dc82087c5ae0bb2d0..7e9608832e6d7f5be6dc176295b3a4c0507444e6:/lib/log.h diff --git a/lib/log.h b/lib/log.h index 5d39732..f1f55d2 100644 --- a/lib/log.h +++ b/lib/log.h @@ -41,18 +41,6 @@ void disorder_debug(const char *msg, ...) /* report a message of the given class. @errno_value@ if present an * non-zero is included. @fatal@ terminates the process. */ -/** @brief Backward-compatibility alias for disorder_fatal() */ -#define fatal disorder_fatal - -/** @brief Backward-compatibility alias for disorder_error() */ -#define error disorder_error - -/** @brief Backward-compatibility alias for disorder_info() */ -#define info disorder_info - -/** @brief Backward-compatibility alias for disorder_debug() */ -#define debug disorder_debug - extern int debugging; /* set when debugging enabled */ @@ -69,11 +57,16 @@ extern const char *debug_filename; extern int debug_lineno; extern int logdate; +/** @brief Issue a debug message if debugging is turned on + * @param x Parenthesized debug arguments + * + * Use in the format: D(("format string", arg, arg, ...)); + */ #define D(x) do { \ if(debugging) { \ debug_filename=__FILE__; \ debug_lineno=__LINE__; \ - debug x; \ + disorder_debug x; \ } \ } while(0)