.\" Generated by scdoc 1.11.2 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "fcft_log_init" "3" "2024-02-01" "3.1.7" "fcft" .P .SH NAME .P fcft_log_init - configure logging in fcft .P .SH SYNOPSIS .P \fB#include \fR .P \fBvoid fcft_log_init( .RS 4 enum fcft_log_colorize\fR \fIcolorize\fR\fB, bool\fR \fIdo_syslog\fR\fB, enum fcft_log_class\fR \fIlog_level\fR\fB);\fR .P .RE .SH DESCRIPTION .P By default, fcft does not log anything; use \fBfcft_log_init\fR() to enable, and configure logging in fcft.\& .P \fBfcft_log_init\fR() is typically called early, at program startup.\& .P \fIcolorize\fR is one of: .P .nf .RS 4 enum fcft_log_colorize { FCFT_LOG_COLORIZE_NEVER, FCFT_LOG_COLORIZE_ALWAYS, FCFT_LOG_COLORIZE_AUTO }; .fi .RE .P \fBFCFT_LOG_COLORIZE_AUTO\fR enables colors if stderr is a TTY.\& .P if \fIdo_syslog\fR is set, fcft will log to syslog, in addition to the regular logging on stderr.\& .P Note that fcft does not call \fBopenlog\fR(), even if \fIdo_syslog\fR is set.\& Do this from the calling application.\& Before, or after calling \fBfcft_log_init\fR() does not matter, as long as it is done before calling any other fcft API functions.\& .P .P Finally, \fIlog_level\fR configures which types of log messages that will be shown.\& .nf .RS 4 enum fcft_log_class { FCFT_LOG_CLASS_NONE, FCFT_LOG_CLASS_ERROR, FCFT_LOG_CLASS_WARNING, FCFT_LOG_CLASS_INFO, FCFT_LOG_CLASS_DEBUG }; .fi .RE .P Note that this is not a bitmask; setting \fBFCFT_LOG_CLASS_INFO\fR, also enables \fBFCFT_LOG_CLASS_WARNING\fR and \fBFCFT_LOG_CLASS_ERROR\fR.\&