.TH TICKIT_DEBUG 7 .SH NAME Tickit_Debug \- debug logging support for \fIlibtickit\fP .SH SYNOPSIS .EX $ TICKIT_DEBUG_FLAGS=W TICKIT_DEBUG_FILE=tickit.log a-tickit-program .EE .SH DESCRIPTION The \fIlibtickit\fP library contains a debug logging system that other parts of the library use to report on interesting events and behaviours, that may help developers to observe internal details and assist in the development and debugging of applications that use the library. .PP Debug messages themselves each have a flag name, which is a short string identifying the library component or event that caused that message. A given set of these flags can be enabled during a debugging session, causing only those messages to be printed. Messages pertaining to flags that are not enabled will not be printed. .SH FLAGS Each flag name starts with an upper-case letter indicating the library component it relates to, then lower-case letters to indicate the particular kind of event or message within that component. .SS B These messages relate to \fBTickitRenderBuffer\fP (tickit_renderbuffer(7)). .TP \f(CwBd\fP Drawing operations such as \fBtickit_renderbuffer_text\fP(3). .TP \f(CwBf\fP Flushing .TP \f(CwBs\fP Stack state save and restore. .TP \f(CwBt\fP .SS I These messages relate to input-system events. .TP \f(CwIk\fP Keyboard keypresses. .TP \f(CwIm\fP Mouse movement and button or wheel events. .TP \f(CwIr\fP Terminal resize. Transformations (translation, clipping and masking). .SS W These messages relate to windows. .TP \f(CwW*\fP Window destroyed. .TP \f(CwWd\fP Damage to root window. .TP \f(CwWx\fP Window is exposed. .TP \f(CwWh\fP Window hierarchy changed. .TP \f(CwWs\fP Window scrolls. .TP \f(CwWsr\fP Window propagates a scrollrect to its underlying terminal. .SH ENVIRONMENT The debugging support is controlled by the following environment variables, which should be set before the application starts, or early during its initialisation before it has invoked any \fIlibtickit\fP functions. .TP \f(CwTICKIT_DEBUG_FLAGS\fP A comma-separated list of the flags or flag categories to enable for printing. Entire categories of flags can be enabled by list just the initial capital letter of its name. All the flags can be enabled at once by setting the name \f(Cw*\fP. .TP \f(CwTICKIT_DEBUG_FILE\fP Gives the name of a file to open in append mode to write logging lines to. .TP \f(CwTICKIT_DEBUG_FD\fP Gives a file descriptor number to write logging lines to. .PP One technique that may be useful to observe logging in real-time while the application runs is to arrange for the application to run in a new terminal but have it log debugging output to an existing one. This may be achieved using .sp .EX $ TICKIT_DEBUG_FD=3 TICKIT_DEBUG_FLAGS=... $TERM my-tickit-app 3>&2 .EE .sp This requests that \fIlibtickit\fP log to file descriptor 3, which has been created by dup(2)ing the original shell's standard output. Debug logging will therefore be printed to the existing terminal where this command was executed, while the application itself draws its output to the newly-created one. .SH FUNCTIONS The debug system is initialised by calling \fBtickit_debug_init\fP(3). Messages can be logged using \fBtickit_debug_logf\fP(3) and \fBtickit_debug_vlogf\fP(3). .SH "SEE ALSO" .BR tickit (7), .BR tickit_term (7), .BR tickit_renderbuffer (7), .BR tickit_window (7)