X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fxmlerror.c;h=27bbb5c136e35317a72005bc6f5274f51c85b56b;hp=067ef25c784c23eda8dacdd6b14af7e637e4a5f3;hb=fcdccb3e9a757d41e1bdf6c18c2b3bdb2314ca3f;hpb=ee6ab2ee3a9ee1a8c65d7272ec7fba1d886f5af0 diff --git a/src/xmlerror.c b/src/xmlerror.c index 067ef25..27bbb5c 100644 --- a/src/xmlerror.c +++ b/src/xmlerror.c @@ -1,11 +1,13 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2008 Index Data + * Copyright (C) 1995-2011 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); } @@ -46,17 +48,19 @@ void yaz_log_xml_errors(const char *prefix, int log_level) #if YAZ_HAVE_XML2 xmlSetGenericErrorFunc((void *) (prefix ? prefix : "XML"), xml_error_handler); -#endif #if YAZ_HAVE_XSLT xsltSetGenericErrorFunc((void *) (prefix ? prefix : "XSLT"), xml_error_handler); #endif +#endif } /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ +