X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2Flog.h;h=3faff7cae7e8e1b66852fcde81234d12cbf88cb1;hb=155ca4a5ebeb7827e1dd280dbd64e56f40e3bb4b;hp=68218561d98922404f2f35b8a815fa40de2b90fb;hpb=964580242e2e0b2e570f652afa58bfb90ad0bb5e;p=yaz-moved-to-github.git diff --git a/include/yaz/log.h b/include/yaz/log.h index 6821856..3faff7c 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-2010 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.39 2006-10-09 21:02:41 adam Exp $ */ /** * \file log.h @@ -196,50 +195,12 @@ 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_NEW_LOG - -#else -#include - -/** The old LOG_ bit names are here for compatibility only. They may - conflict with bits defined in syslog.h, or other places. 'LOG' - really is not such a good name. YLOG must be more unique +/** \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 */ - -/** \brief old log level */ -#define LOG_FATAL YLOG_FATAL -/** \brief old log level */ -#define LOG_DEBUG YLOG_DEBUG -/** \brief old log level */ -#define LOG_WARN YLOG_WARN -/** \brief old log level */ -#define LOG_LOG YLOG_LOG -/** \brief old log level */ -#define LOG_ERRNO YLOG_ERRNO -/** \brief old log level */ -#define LOG_FILE 0x00000020 -/** \brief old log level */ -#define LOG_APP YLOG_APP -/** \brief old log level */ -#define LOG_MALLOC YLOG_MALLOC -/** \brief old log level */ -#define LOG_NOTIME YLOG_NOTIME -/** \brief old log level */ -#define LOG_APP2 YLOG_APP2 -/** \brief old log level */ -#define LOG_APP3 YLOG_APP3 -/** \brief old log level */ -#define LOG_FLUSH YLOG_FLUSH -/** \brief old log level */ -#define LOG_ALL YLOG_ALL -/** \brief old log level */ -#define LOG_DEFAULT_LEVEL YLOG_DEFAULT_LEVEL - -/** \brief logf is deprecated, as it conflicts with a math function */ -#define logf yaz_log - -#endif /* if YAZ_USE_NEW_LOG */ +YAZ_EXPORT void yaz_log_xml_errors(const char *prefix, int log_level); YAZ_END_CDECL @@ -247,6 +208,7 @@ YAZ_END_CDECL /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab