[libdvbpsi-devel] [RFC] changes

Jean-Paul Saman jpsaman at gmail.com
Tue Nov 23 11:18:25 CET 2010


On Mon, Nov 22, 2010 at 10:56 PM, Bernhard Ehlers <b-ehlers at gmx.de> wrote:
>> 2)
>> libdvbpsi uses debug macros that end up doing printf() on the console.
>> Since libdvbpsi is mostly used as library, this is IMHO not wanted. I
>> want to replace this by either:
>> a) a log callback with the message from the DEBUG macros as argument, or
>> b) make them only available for testing (maintainer) and basically
>> remove them from --enable-debug (and --enable-release)
>>
>> Any comments/objections?
> I also prefer a way to suppress the direct printf output.
>
> But I would like this not only for DVBPSI_DEBUG, but also for DVBPSI_ERROR.
> I prefer a way, that an application can install a callback function (printf is the default),
> where the application can decide what to do with the message.
>
> I'm fine with the current way, that DVBPSI_DEBUG is used only, when --enable-debug
> is defined. So DVBPSI_DEBUG messages are for maintainers, DVBPSI_ERROR
> messages are for all.

I think a callback with some way of specifying verbosity (or
filtering) by the calling application would be the way to go.

Kind regards,
Jean-Paul Saman.


More information about the libdvbpsi-devel mailing list