-/*
- * Copyright (c) 1995-2007, 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:
* (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.42 2007-01-03 08:42:14 adam Exp $ */
/**
* \file log.h
YAZ_EXPORT void log_event_end(void (*func)(int level, const char *msg,
void *info), void *info);
-/* if syslog.h is already included, do not define the old LOG_'s */
-#ifdef LOG_DEBUG
-#undef YAZ_USE_NEW_LOG
-#define YAZ_USE_NEW_LOG 1
-#endif
-
-#if YAZ_USE_NEW_LOG
-#else
-
-#include <yaz/xmalloc.h>
-
-/** 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
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab