aboutsummaryrefslogtreecommitdiffstats
path: root/common/logging.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-12-11 09:37:30 +0000
committerWerner Koch <[email protected]>2017-12-11 09:42:23 +0000
commit34defc9bce91d66fa8c9481ebe6e78b612e570dc (patch)
treef6f3e7ac1d714f57f7299d92eb009f845f6d8897 /common/logging.h
parentdoc: Clarify C90 exceptions and add a new commit tag. (diff)
downloadgnupg-34defc9bce91d66fa8c9481ebe6e78b612e570dc.tar.gz
gnupg-34defc9bce91d66fa8c9481ebe6e78b612e570dc.zip
Adjust for changed macro names in libgpg-error master.
* common/logging.h (GPGRT_LOGLVL_): New replacement macros for older libgpg-error versions. -- Updates-commit: b56dfdfc1865ceb7c3c025d79996e049faee7fdf Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/logging.h')
-rw-r--r--common/logging.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/common/logging.h b/common/logging.h
index 5ed769a0d..5a82be4a0 100644
--- a/common/logging.h
+++ b/common/logging.h
@@ -48,7 +48,8 @@ static inline void bug_at (const char *file, int line, const char *func)
static inline void
bug_at (const char *file, int line, const char *func)
{
- gpgrt_log (GPGRT_LOG_BUG, "there is a bug at %s:%d:%s\n", file, line, func);
+ gpgrt_log (GPGRT_LOGLVL_BUG, "there is a bug at %s:%d:%s\n",
+ file, line, func);
abort ();
}
# else
@@ -58,7 +59,7 @@ static inline void bug_at (const char *file, int line)
static inline void
bug_at (const char *file, int line)
{
- gpgrt_log (GPGRT_LOG_BUG, "there is a bug at %s:%d\n", file, line);
+ gpgrt_log (GPGRT_LOGLVL_BUG, "there is a bug at %s:%d\n", file, line);
abort ();
}
# endif /*!GPGRT_HAVE_MACRO_FUNCTION*/
@@ -116,6 +117,15 @@ enum jnlib_log_levels {
GPGRT_LOG_BUG,
GPGRT_LOG_DEBUG
};
+#define GPGRT_LOGLVL_BEGIN GPGRT_LOG_BEGIN
+#define GPGRT_LOGLVL_CONT GPGRT_LOG_CONT
+#define GPGRT_LOGLVL_INFO GPGRT_LOG_INFO
+#define GPGRT_LOGLVL_WARN GPGRT_LOG_WARN
+#define GPGRT_LOGLVL_ERROR GPGRT_LOG_ERROR
+#define GPGRT_LOGLVL_FATAL GPGRT_LOG_FATAL
+#define GPGRT_LOGLVL_BUG GPGRT_LOG_BUG
+#define GPGRT_LOGLVL_DEBUG GPGRT_LOG_DEBUG
+
void log_log (int level, const char *fmt, ...) GPGRT_ATTR_PRINTF(2,3);
void log_logv (int level, const char *fmt, va_list arg_ptr);
void log_logv_prefix (int level, const char *prefix,