X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2Flog.h;h=7ab546900c56a8a48aaffd601d7839029df27103;hb=6f7757087a49db5fb3fa4f3b12b8b67ebbbe3aa3;hp=1b0a6c469e359d672fe9db82df6a542bc8b9469a;hpb=2ede0bb278b22c8ce1cdd48e9a11a5924d433763;p=yaz-moved-to-github.git diff --git a/include/yaz/log.h b/include/yaz/log.h index 1b0a6c4..7ab5469 100644 --- a/include/yaz/log.h +++ b/include/yaz/log.h @@ -1,5 +1,5 @@ -/* - * Copyright (c) 1995-2006, Index Data +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2008 Index Data. * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -24,7 +24,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: log.h,v 1.40 2006-12-06 21:35:58 adam Exp $ */ /** * \file log.h @@ -196,7 +195,21 @@ YAZ_EXPORT void log_event_start(void (*func)(int level, const char *msg, YAZ_EXPORT void log_event_end(void (*func)(int level, const char *msg, void *info), void *info); -#if YAZ_USE_OLD_LOG + +/** \brief Makes Libxml2/Libxslt log errors via yaz_log + \param prefix prefix to use for log messages (may be 0) + \param log_level log level to use for messages +*/ +YAZ_EXPORT void yaz_log_xml_errors(const char *prefix, int log_level); + +/* by default, do not enable the old LOG_-defines */ +#ifndef YAZ_USE_NEW_LOG +#define YAZ_USE_NEW_LOG 1 +#endif + +#if YAZ_USE_NEW_LOG + +#else #include @@ -237,7 +250,7 @@ YAZ_EXPORT void log_event_end(void (*func)(int level, const char *msg, /** \brief logf is deprecated, as it conflicts with a math function */ #define logf yaz_log -#endif /* if YAZ_USE_OLD_LOG */ +#endif /* if !YAZ_USE_NEW_LOG */ YAZ_END_CDECL