Debug

Debug — Debugging facilities.

Functions

#define MIRAGE_DEBUG()

Types and Values

Includes

#include <mirage-debug.h>

Description

libMirage supports changing of debug message verbosity on fly, without the need to restart the application. This is achieved by using MirageContext objects, which are attached to objects implementing MirageContextual interface. Such an object is MirageObject, which can obtain context from its parent. This way, all objects in the hierarchy share the same context, and same debug verbosity setting.

Debug verbosity can be controlled via mask, which can be set to the context using mirage_context_set_debug_mask(). See MirageDebugMasks. The actual printing of debug messages within the code is achieved by mirage_contextual_debug_messagev() or mirage_contextual_debug_message(), or by convenience macro MIRAGE_DEBUG().

Functions

MIRAGE_DEBUG()

#define MIRAGE_DEBUG(obj, lvl, ...) mirage_contextual_debug_message(MIRAGE_CONTEXTUAL(obj), lvl, __VA_ARGS__)

Debugging macro, provided for convenience. It performs cast to MirageContextual interface on obj and calls mirage_contextual_debug_message() with debug level lvl and debug message msg ....

Parameters

obj

object.

[in]

lvl

debug level.

[in]

msg...

debug message.

[in]

Types and Values

enum MirageDebugMasks

Debug message types and debug masks used to control verbosity of various parts of libMirage.

All masks except MIRAGE_DEBUG_ERROR and MIRAGE_DEBUG_WARNING can be combined together to control verbosity of libMirage.

Members

MIRAGE_DEBUG_ERROR

error message

 

MIRAGE_DEBUG_WARNING

warning message

 

MIRAGE_DEBUG_PARSER

message belonging to disc parser and file stream parser

 

MIRAGE_DEBUG_DISC

message belonging to disc

 

MIRAGE_DEBUG_SESSION

message belonging to session

 

MIRAGE_DEBUG_TRACK

message belonging to track

 

MIRAGE_DEBUG_SECTOR

message belonging to sector

 

MIRAGE_DEBUG_FRAGMENT

message belonging to fragment

 

MIRAGE_DEBUG_CDTEXT

message belonging to CD-TEXT encoder/decoder

 

MIRAGE_DEBUG_FILE_IO

messages belonging to file filter I/O operations

 

See Also

MirageContext, MirageContextual