X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fxmlerror.c;h=c01fc4318c74867af3230d3c538413814ad32525;hp=8f0527499cd314b28001ac7494db029a692da5d2;hb=05193e78a2553c93a61da19a39e1276b1a509bac;hpb=2788a4851b551e1a3efb320a2878b809f2d8a9d7 diff --git a/src/xmlerror.c b/src/xmlerror.c index 8f05274..c01fc43 100644 --- a/src/xmlerror.c +++ b/src/xmlerror.c @@ -1,11 +1,13 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ - /** \file \brief Log XML / XSLT Errors via yaz_log */ +#if HAVE_CONFIG_H +#include +#endif #include #include @@ -33,7 +35,7 @@ static void xml_error_handler(void *ctx, const char *fmt, ...) va_start(ap, fmt); yaz_vsnprintf(buf, sizeof(buf), fmt, ap); - yaz_log(YLOG_WARN, "%s: %s", prefix, buf); + yaz_log(xml_error_log_level, "%s: %s", prefix, buf); va_end (ap); } @@ -42,11 +44,11 @@ static void xml_error_handler(void *ctx, const char *fmt, ...) void yaz_log_xml_errors(const char *prefix, int log_level) { xml_error_log_level = log_level; - + #if YAZ_HAVE_XML2 xmlSetGenericErrorFunc((void *) (prefix ? prefix : "XML"), xml_error_handler); -#if YAZ_HAVE_XSLT +#if YAZ_HAVE_XSLT xsltSetGenericErrorFunc((void *) (prefix ? prefix : "XSLT"), xml_error_handler); #endif @@ -56,7 +58,9 @@ void yaz_log_xml_errors(const char *prefix, int log_level) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ +