From 8e6e23b8d0c6cd58555073db820b74f1c57bc33e Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 23 May 2018 16:18:11 +0200 Subject: [PATCH] build: Always enable debugging logging We shouldn't need to specifically enable debug logging to get useful data out of a compiled libfprint either, so always enable debugging output. It will still be switched off at runtime, by default. --- libfprint/core.c | 2 -- libfprint/data.c | 2 -- libfprint/fp_internal.h | 5 ----- meson.build | 5 ----- meson_options.txt | 4 ---- 5 files changed, 18 deletions(-) diff --git a/libfprint/core.c b/libfprint/core.c index 7adc86cb..5deb3a6e 100644 --- a/libfprint/core.c +++ b/libfprint/core.c @@ -123,14 +123,12 @@ void fpi_log(enum fpi_log_level level, const char *component, FILE *stream = stdout; const char *prefix; -#ifndef ENABLE_DEBUG_LOGGING if (!log_level) return; if (level == FPRINT_LOG_LEVEL_WARNING && log_level < 2) return; if (level == FPRINT_LOG_LEVEL_INFO && log_level < 3) return; -#endif switch (level) { case FPRINT_LOG_LEVEL_INFO: diff --git a/libfprint/data.c b/libfprint/data.c index a0ac620f..7e47db23 100644 --- a/libfprint/data.c +++ b/libfprint/data.c @@ -76,7 +76,6 @@ void fpi_data_exit(void) ((finger) >= LEFT_THUMB && (finger) <= RIGHT_LITTLE) /* for debug messages only */ -#ifdef ENABLE_DEBUG_LOGGING static const char *finger_num_to_str(enum fp_finger finger) { const char *names[] = { @@ -95,7 +94,6 @@ static const char *finger_num_to_str(enum fp_finger finger) return "UNKNOWN"; return names[finger]; } -#endif static struct fp_print_data *print_data_new(uint16_t driver_id, uint32_t devtype, enum fp_print_data_type type) diff --git a/libfprint/fp_internal.h b/libfprint/fp_internal.h index e8f06f04..fdaa408d 100644 --- a/libfprint/fp_internal.h +++ b/libfprint/fp_internal.h @@ -50,12 +50,7 @@ void fpi_log(enum fpi_log_level, const char *component, const char *function, #define _fpi_log(level, fmt...) fpi_log(level, FP_COMPONENT, __FUNCTION__, fmt) -#ifdef ENABLE_DEBUG_LOGGING #define fp_dbg(fmt...) _fpi_log(FPRINT_LOG_LEVEL_DEBUG, fmt) -#else -#define fp_dbg(fmt...) -#endif - #define fp_info(fmt...) _fpi_log(FPRINT_LOG_LEVEL_INFO, fmt) #define fp_warn(fmt...) _fpi_log(FPRINT_LOG_LEVEL_WARNING, fmt) #define fp_err(fmt...) _fpi_log(FPRINT_LOG_LEVEL_ERROR, fmt) diff --git a/meson.build b/meson.build index 62791db6..93603b6b 100644 --- a/meson.build +++ b/meson.build @@ -90,11 +90,6 @@ if get_option('x11-examples') endif endif -# Message logging -if get_option('debug_log') - libfprint_conf.set('ENABLE_DEBUG_LOGGING', '1') -endif - libfprint_conf.set('API_EXPORTED', '__attribute__((visibility("default")))') configure_file(output: 'config.h', configuration: libfprint_conf) diff --git a/meson_options.txt b/meson_options.txt index c0a73917..f847bff0 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -14,10 +14,6 @@ option('x11-examples', description: 'Whether to build X11 example applications', type: 'boolean', value: true) -option('debug_log', - description: 'Debug message logging', - type: 'boolean', - value: false) option('doc', description: 'Whether to build the API documentation', type: 'boolean',