X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/093ec8103f8de58d890a77b458985ecf4293bfa7..cc3456940b6b30a0fc4f83226c34e4e873336cd0:/lib/log.h diff --git a/lib/log.h b/lib/log.h index 4d91008..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 */ @@ -67,12 +55,18 @@ extern struct log_output log_stderr, log_syslog, *log_default; 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)