Runtime Toggled Debug Logging

Runtime Toggled Debug Logging — methods to quickly turn logging on and off for portions of GSK.

Synopsis

enum                GskDebugFlags;
extern              const gboolean gsk_debugging_on;
void                gsk_debug_set_flags                 (GskDebugFlags flags);
void                gsk_debug_add_flags                 (GskDebugFlags flags);
extern              GskDebugFlags gsk_debug_flags;

Description

These functions allow you to programmitcally set the GSK debugging flags. Usually, one sets these at runtime instead, by using the --gsk-debug=FLAGS command-line argument to your program.

In any event, GSK's debugging facilities are only available if GSK itself was configured with gsk-debug support, by specifying [--enable-gsk-debug] to GSK's configure script.

Details

enum GskDebugFlags

typedef enum
{
  GSK_DEBUG_IO     		= (1<<0),
  GSK_DEBUG_STREAM 		= (1<<1),
  GSK_DEBUG_STREAM_LISTENER 	= (1<<2),
  GSK_DEBUG_STREAM_DATA         = (1<<3),
  GSK_DEBUG_LIFETIME		= (1<<4),
  GSK_DEBUG_MAIN_LOOP		= (1<<5),
  GSK_DEBUG_DNS			= (1<<6),
  GSK_DEBUG_HOOK		= (1<<7),
  GSK_DEBUG_SSL     		= (1<<8),
  GSK_DEBUG_HTTP     		= (1<<9),
  GSK_DEBUG_FTP     		= (1<<10),
  GSK_DEBUG_REQUEST 		= (1<<11),
  GSK_DEBUG_FD                  = (1<<12),

  GSK_DEBUG_ALL			= 0xffffffff
} GskDebugFlags;

Flags which may be turned on to print debugging messages about them.

GSK_DEBUG_IO

I/O hook debugging.

GSK_DEBUG_STREAM

Read/write debugging.

GSK_DEBUG_STREAM_LISTENER

Server listener debugging.

GSK_DEBUG_STREAM_DATA

Stream debugging by dumping all the data exchanged with the stream.

GSK_DEBUG_LIFETIME

Debug object lifetime issues.

GSK_DEBUG_MAIN_LOOP

Debug main-loop behavior.

GSK_DEBUG_DNS

Debug name lookup behavior.

GSK_DEBUG_HOOK

Debug hooks.

GSK_DEBUG_SSL

Debug SSL (a secure transport layer, used by https).

GSK_DEBUG_HTTP

Debug HTTP, the protocol used for web pages.

GSK_DEBUG_FTP

GSK_DEBUG_REQUEST

GSK_DEBUG_FD

Debug file-descriptor usage.

GSK_DEBUG_ALL

All debug flags.

gsk_debugging_on

extern const gboolean gsk_debugging_on;

Whether debugging is on.

This corresponds with whether GSK's <program>configure</program> script was run with the [--enable-gsk-debug] option.


gsk_debug_set_flags ()

void                gsk_debug_set_flags                 (GskDebugFlags flags);

Set which types of debug logs to emit.

flags :

debug bits to start logging.

gsk_debug_add_flags ()

void                gsk_debug_add_flags                 (GskDebugFlags flags);

Add new types of debug logs to emit.

flags :

debug bits to start logging.

gsk_debug_flags

extern GskDebugFlags gsk_debug_flags;