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.
This commit is contained in:
Bastien Nocera 2018-05-23 16:18:11 +02:00
parent 63e5d56441
commit 8e6e23b8d0
5 changed files with 0 additions and 18 deletions

View file

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

View file

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

View file

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

View file

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

View file

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