Top | ![]() |
![]() |
![]() |
![]() |
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()
.
#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, specified by format string and
format arguments.
#define MIRAGE_DEBUG_ON(obj, lvl) mirage_contextual_debug_is_active(MIRAGE_CONTEXTUAL(obj), lvl)
Debugging macro, provided for convenience. It performs cast to
MirageContextual interface on obj
and calls mirage_contextual_debug_is_active()
with debug level lvl
.
#define MIRAGE_DEBUG_PRINT_BUFFER(obj, lvl, prefix, width, buffer, buffer_length) mirage_contextual_debug_print_buffer(MIRAGE_CONTEXTUAL(obj), lvl, prefix, width, buffer, buffer_length)
Debugging macro, provided for convenience. It performs cast to
MirageContextual interface on obj
and calls mirage_contextual_debug_print_buffer()
with given arguments.
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.
error message |
||
warning message |
||
message belonging to image parser and file stream parser |
||
message belonging to disc |
||
message belonging to session |
||
message belonging to track |
||
message belonging to sector |
||
message belonging to fragment |
||
message belonging to CD-TEXT encoder/decoder |
||
messages belonging to file and filter stream I/O operations |
||
messages belonging to image identification part of image parsers |
||
messages belonging to image writer |