Logging

Logging — Logging functions

Functions

#define BUG_ON()
#define BUG

Types and Values

#define fp_dbg
#define fp_info
#define fp_warn
#define fp_err

Description

Logging in libfprint is handled through GLib's logging system, and behave the same way as in the GLib Message Output and Debugging Functions documentation.

You should include fpi-log.h as early as possible in your sources, just after setting the FP_COMPONENT define to a string unique to your sources. This will set the suffix of the G_LOG_DOMAIN used for printing.

Functions

BUG_ON()

#define             BUG_ON(condition)

Uses fp_err() to print an error if the condition is true.

Parameters

condition

the condition to check

 

BUG

#define BUG() BUG_ON (1)

Same as BUG_ON() but is always true.

Types and Values

fp_dbg

#define fp_dbg g_debug

Same as g_debug().


fp_info

#define fp_info g_debug

Same as g_debug().


fp_warn

#define fp_warn g_warning

Same as g_warning().


fp_err

#define fp_err g_critical

Same as g_critical(). In the future, this might be changed to a g_assert() instead, so bear this in mind when adding those calls to your driver.