Function
SoupLoggerPrinter
Declaration
void
(* SoupLoggerPrinter) (
SoupLogger* logger,
SoupLoggerLogLevel level,
char direction,
const char* data,
gpointer user_data
)
Description [src]
The prototype for a custom printing callback.
level
indicates what kind of information is being printed. Eg, it
will be SOUP_LOGGER_LOG_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);
Parameters
logger
-
Type:
SoupLogger
The
SoupLogger
.The data is owned by the caller of the function. level
-
Type:
SoupLoggerLogLevel
The level of the information being printed.
direction
-
Type:
char
A single-character prefix to
data
. data
-
Type:
const char*
Data to print.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. user_data
-
Type:
gpointer
The data passed to
soup_logger_set_printer()
The argument can be NULL
.The data is owned by the caller of the function.