From 63e5d564414113f6b97d8bcb0082972655c63bf3 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 23 May 2018 15:40:31 +0200 Subject: [PATCH] build: Always allow switching log level at runtime There are no parts of libfprint that are so resource intensive that we'd want to disable logging. This avoids (hopefully rare) cases where compiled versions of libfprint are distributed with logging completely disabled, and thus can't be debugged. --- libfprint/fp_internal.h | 4 ---- meson.build | 3 --- meson_options.txt | 4 ---- 3 files changed, 11 deletions(-) diff --git a/libfprint/fp_internal.h b/libfprint/fp_internal.h index 5e3522b..e8f06f0 100644 --- a/libfprint/fp_internal.h +++ b/libfprint/fp_internal.h @@ -48,11 +48,7 @@ void fpi_log(enum fpi_log_level, const char *component, const char *function, #define FP_COMPONENT NULL #endif -#ifdef ENABLE_LOGGING #define _fpi_log(level, fmt...) fpi_log(level, FP_COMPONENT, __FUNCTION__, fmt) -#else -#define _fpi_log(level, fmt...) -#endif #ifdef ENABLE_DEBUG_LOGGING #define fp_dbg(fmt...) _fpi_log(FPRINT_LOG_LEVEL_DEBUG, fmt) diff --git a/meson.build b/meson.build index a9abc3f..62791db 100644 --- a/meson.build +++ b/meson.build @@ -91,9 +91,6 @@ if get_option('x11-examples') endif # Message logging -if get_option('log') - libfprint_conf.set('ENABLE_LOGGING', '1') -endif if get_option('debug_log') libfprint_conf.set('ENABLE_DEBUG_LOGGING', '1') endif diff --git a/meson_options.txt b/meson_options.txt index ee442c3..c0a7391 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('log', - description: 'Message logging', - type: 'boolean', - value: true) option('debug_log', description: 'Debug message logging', type: 'boolean',