6.6 SoupLoggerPrinter

Callback: SoupLoggerPrinter

A procedure given for it is called as (procedure logger level direction data).

The prototype for a custom printing callback.

level indicates what kind of information is being printed. Eg, it will be headers if data is header data.

direction is either ’<’, ’>’, or ’ ’, and data is the single line to print; the printer is expected to add a terminating newline.

To get the effect of the default printer, you would do:

printf ("%c %s\n", direction, data);
logger

Passed: a <SoupLogger>.

the <SoupLogger>

level

Passed: a <SoupLoggerLogLevel>.

the level of the information being printed.

direction

Passed: an 8-bit integer.

a single-character prefix to data

data

Passed: a string.

data to print

user-data

Not passed: it is the user data that guile-gi supplied.

the data passed to Logger.set_printer