fcft_log_init(3)
Hiii bestie! Welcome to the fcft manual β this is the page for fcft_log_init(3), and it's literally all about turning on and tuning fcft's logging. π
π NAME π
fcft_log_init β configure logging in fcft π
β¨ SYNOPSIS β¨
#include <fcft/fcft.h>
void fcft_log_init(
enum fcft_log_colorize colorize, bool do_syslog, enum fcft_log_class
log_level);
π¦ DESCRIPTION π¦
Okay so here's the tea: by default, fcft does not log anything. Not a peep. π Use fcft_log_init() to enable logging and configure how it works in fcft. β¨
fcft_log_init() is typically called early, at program startup. π«Ά
The colorize parameter is one of these, no cap:
enum fcft_log_colorize {
FCFT_LOG_COLORIZE_NEVER,
FCFT_LOG_COLORIZE_ALWAYS,
FCFT_LOG_COLORIZE_AUTO
};
FCFT_LOG_COLORIZE_AUTO enables colors if stderr is a TTY. π
If do_syslog is set, fcft will log to syslog, in addition to the regular logging on stderr. π¬
Note that fcft does not callopenlog(), even ifdo_syslogis set. Do this from the calling application. Before, or after callingfcft_log_init()does not matter, as long as it is done before calling any other fcft API functions. β οΈ
Finally, log_level configures which types of log messages that will be shown. π
enum fcft_log_class {
FCFT_LOG_CLASS_NONE,
FCFT_LOG_CLASS_ERROR,
FCFT_LOG_CLASS_WARNING,
FCFT_LOG_CLASS_INFO,
FCFT_LOG_CLASS_DEBUG
};
Note that this is not a bitmask; settingFCFT_LOG_CLASS_INFOalso enablesFCFT_LOG_CLASS_WARNINGandFCFT_LOG_CLASS_ERROR. π«Ά
That's the whole page, bestie! π This one's from the fcft manual, version 3.3.3, dated 2026-04-09, page fcft_log_init(3). Mwah π
β¨
π¦ where this page comes from
- alpine 3.24: fcft-doc 3.3.3-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms