YAZ  5.25.0
Functions | Variables
xmlerror.c File Reference

Log XML / XSLT Errors via yaz_log. More...

#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <yaz/log.h>
#include <yaz/snprintf.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxslt/xsltutils.h>

Go to the source code of this file.


static void xml_error_handler (void *ctx, const char *fmt,...)
void yaz_log_xml_errors (const char *prefix, int log_level)
 Makes Libxml2 and Libxslt log errors through yaz_log. More...


static int xml_error_log_level = YLOG_WARN

Detailed Description

Log XML / XSLT Errors via yaz_log.

Definition in file xmlerror.c.

Function Documentation

◆ xml_error_handler()

static void xml_error_handler ( void *  ctx,
const char *  fmt,

Definition at line 29 of file xmlerror.c.

References xml_error_log_level, yaz_log(), and yaz_vsnprintf().

Referenced by yaz_log_xml_errors().

◆ yaz_log_xml_errors()

void yaz_log_xml_errors ( const char *  prefix,
int  log_level 

Makes Libxml2 and Libxslt log errors through yaz_log.

prefixprefix to use for log messages (may be 0)
log_levellog level to use for Libxml2/Libxslt messages

Definition at line 47 of file xmlerror.c.

References log_level, xml_error_handler(), and xml_error_log_level.

Referenced by new_session().

Variable Documentation

◆ xml_error_log_level

int xml_error_log_level = YLOG_WARN

Definition at line 26 of file xmlerror.c.

Referenced by xml_error_handler(), and yaz_log_xml_errors().