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.
This commit is contained in:
Bastien Nocera 2018-05-23 15:40:31 +02:00
parent e9bfd943fc
commit 63e5d56441
3 changed files with 0 additions and 11 deletions

View file

@ -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)

View file

@ -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

View file

@ -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',