AM_DISABLE_SHARED
AM_PROG_LIBTOOL
-YAZ_INIT(threads,2.0.12)
+YAZ_INIT(threads,2.0.29)
YAZ_DOC
AC_ARG_ENABLE(zoom,[ --disable-zoom disable ZOOM (for old C++ compilers)],[enable_zoom=$enableval],[enable_zoom=yes])
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-cql2rpn.cpp,v 1.4 2004-03-29 22:46:51 adam Exp $
+ * $Id: yaz-cql2rpn.cpp,v 1.5 2004-11-30 21:10:30 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz/pquery.h>
#include <yaz++/cql2rpn.h>
int r = cql_parser_string(cp, cql_query);
if (r)
{
- yaz_log(LOG_LOG, "CQL Parse Error");
+ yaz_log(YLOG_LOG, "CQL Parse Error");
r = 10;
}
else
size_t off;
const char *pqf_msg;
int code = yaz_pqf_error(pp, &pqf_msg, &off);
- yaz_log(LOG_WARN, "PQF Parser Error %s (code %d)",
+ yaz_log(YLOG_WARN, "PQF Parser Error %s (code %d)",
pqf_msg, code);
r = -1;
}
else
{
r = cql_transform_error(m_transform, &addinfo);
- yaz_log(LOG_LOG, "CQL Transform Error %d %s", r,
+ yaz_log(YLOG_LOG, "CQL Transform Error %d %s", r,
addinfo ? addinfo : "");
}
}
* Copyright (c) 1998-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-ir-assoc.cpp,v 1.21 2004-03-30 18:14:13 adam Exp $
+ * $Id: yaz-ir-assoc.cpp,v 1.22 2004-11-30 21:10:30 adam Exp $
*/
#include <assert.h>
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz++/ir-assoc.h>
Yaz_IR_Assoc::Yaz_IR_Assoc(IYaz_PDU_Observable *the_PDU_Observable)
m_host = 0;
m_proxy = 0;
m_cookie = 0;
- m_log = LOG_DEBUG;
+ m_log = YLOG_DEBUG;
const char *db = "Default";
set_databaseNames(1, &db);
}
* Copyright (c) 1998-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-my-client.cpp,v 1.15 2004-01-05 11:31:04 adam Exp $
+ * $Id: yaz-my-client.cpp,v 1.16 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz/options.h>
#include <yaz/diagbib1.h>
#include <yaz/marcdisp.h>
* Copyright (c) 1998-2001, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-my-server.cpp,v 1.12 2003-10-16 11:43:37 adam Exp $
+ * $Id: yaz-my-server.cpp,v 1.13 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz/options.h>
#include <yaz++/z-server.h>
#include <yaz++/pdu-assoc.h>
Z_ItemOrder *io,
Z_ExtendedServicesResponse *res)
{
- yaz_log (LOG_LOG, "MyServer::ill_service");
+ yaz_log (YLOG_LOG, "MyServer::ill_service");
}
void MyUpdate::update_service (Z_ExtendedServicesRequest *req,
Z_IUUpdate *io,
Z_ExtendedServicesResponse *res)
{
- yaz_log (LOG_LOG, "MyServer::update_service (v1.1)");
+ yaz_log (YLOG_LOG, "MyServer::update_service (v1.1)");
}
void MyUpdate::update_service0 (Z_ExtendedServicesRequest *req,
Z_IU0Update *io,
Z_ExtendedServicesResponse *res)
{
- yaz_log (LOG_LOG, "MyServer::update_service (v1.0)");
+ yaz_log (YLOG_LOG, "MyServer::update_service (v1.0)");
}
int MyRetrieval::sr_init (Z_InitRequest *initRequest,
Z_InitResponse *initResponse)
{
- yaz_log (LOG_LOG, "MyServer::sr_init");
+ yaz_log (YLOG_LOG, "MyServer::sr_init");
return 1;
}
void MyRetrieval::sr_search (Z_SearchRequest *searchRequest,
Z_SearchResponse *searchResponse)
{
- yaz_log (LOG_LOG, "MyServer::recv_Z_search");
+ yaz_log (YLOG_LOG, "MyServer::recv_Z_search");
if (searchRequest->query->which == Z_Query_type_1)
{
Z_RPNStructure *s = searchRequest->query->u.type_1->RPNStructure;
void MyRetrieval::sr_present (Z_PresentRequest *presentRequest,
Z_PresentResponse *presentResponse)
{
- yaz_log (LOG_LOG, "MyServer::recv_Z_present");
+ yaz_log (YLOG_LOG, "MyServer::recv_Z_present");
}
void MyRetrieval::sr_record (const char *resultSetName,
Z_NamePlusRecord *namePlusRecord,
Z_Records *records)
{
- yaz_log (LOG_LOG, "MyServer::recv_Z_record");
+ yaz_log (YLOG_LOG, "MyServer::recv_Z_record");
const char *rec = get_record(position);
create_databaseRecord (odr_encode(), namePlusRecord, 0, VAL_USMARC, rec,
strlen(rec));
void MyServer::timeoutNotify()
{
- yaz_log (LOG_LOG, "connection timed out");
+ yaz_log (YLOG_LOG, "connection timed out");
delete this;
}
void MyServer::failNotify()
{
- yaz_log (LOG_LOG, "connection closed by client");
+ yaz_log (YLOG_LOG, "connection closed by client");
delete this;
}
z->server(addr);
if (apdu_log)
{
- yaz_log (LOG_LOG, "set_APDU_log %s", apdu_log);
+ yaz_log (YLOG_LOG, "set_APDU_log %s", apdu_log);
z->set_APDU_log(apdu_log);
}
* Copyright (c) 1998-2001, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-pdu-assoc-thread.cpp,v 1.6 2002-10-09 12:50:26 adam Exp $
+ * $Id: yaz-pdu-assoc-thread.cpp,v 1.7 2004-11-30 21:10:31 adam Exp $
*/
#ifdef WIN32
#endif
#include <errno.h>
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz/tcpip.h>
#include <yaz++/pdu-assoc.h>
{
Yaz_SocketManager *s = (Yaz_SocketManager *) p;
- yaz_log (LOG_LOG, "thread started");
+ yaz_log (YLOG_LOG, "thread started");
while (s->processEvent() > 0)
;
- yaz_log (LOG_LOG, "thread finished");
+ yaz_log (YLOG_LOG, "thread finished");
#ifdef WIN32
#else
return 0;
t_id = _beginthread (events, 0, socket_observable);
if (t_id == -1)
{
- yaz_log (LOG_FATAL|LOG_ERRNO, "_beginthread failed");
+ yaz_log (YLOG_FATAL|YLOG_ERRNO, "_beginthread failed");
exit (1);
}
#else
int id = pthread_create (&tid, 0, events, socket_observable);
if (id)
- yaz_log (LOG_ERRNO|LOG_FATAL, "pthread_create returned id=%d", id);
+ yaz_log (YLOG_ERRNO|YLOG_FATAL, "pthread_create returned id=%d", id);
else
pthread_detach (tid);
#endif
* Copyright (c) 1998-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-pdu-assoc.cpp,v 1.37 2003-10-23 11:45:08 adam Exp $
+ * $Id: yaz-pdu-assoc.cpp,v 1.38 2004-11-30 21:10:31 adam Exp $
*/
#include <assert.h>
#include <string.h>
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz/tcpip.h>
#include <yaz++/pdu-assoc.h>
m_next = 0;
m_destroyed = 0;
m_idleTime = 0;
- m_log = LOG_DEBUG;
+ m_log = YLOG_DEBUG;
}
Yaz_PDU_Assoc::Yaz_PDU_Assoc(IYazSocketObservable *socketObservable)
return;
if (res < 0)
{
- yaz_log(LOG_FATAL|LOG_ERRNO, "cs_listen failed");
+ yaz_log(YLOG_FATAL|YLOG_ERRNO, "cs_listen failed");
return;
}
if (!(new_line = cs_accept(m_cs)))
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-socket-manager.cpp,v 1.28 2004-10-23 12:44:10 adam Exp $
+ * $Id: yaz-socket-manager.cpp,v 1.29 2004-11-30 21:10:31 adam Exp $
*/
#include <assert.h>
#ifdef WIN32
#include <errno.h>
#include <string.h>
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz++/socket-manager.h>
Yaz_SocketManager::YazSocketEntry **Yaz_SocketManager::lookupObserver(
timeout== -1 ? 0 : &to)) < 0)
if (errno != EINTR)
{
- yaz_log(LOG_ERRNO|LOG_WARN, "select");
- yaz_log(LOG_WARN, "errno=%d max=%d timeout=%d",
+ yaz_log(YLOG_ERRNO|YLOG_WARN, "select");
+ yaz_log(YLOG_WARN, "errno=%d max=%d timeout=%d",
errno, max, timeout);
if (++pass > 10)
return -1;
delete event;
return 1;
}
- yaz_log(LOG_WARN, "unhandled event in processEvent res=%d", res);
+ yaz_log(YLOG_WARN, "unhandled event in processEvent res=%d", res);
return 1;
}
m_observers = 0;
m_queue_front = 0;
m_queue_back = 0;
- m_log = LOG_DEBUG;
+ m_log = YLOG_DEBUG;
}
Yaz_SocketManager::~Yaz_SocketManager()
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-assoc.cpp,v 1.33 2004-01-24 21:33:27 adam Exp $
+ * $Id: yaz-z-assoc.cpp,v 1.34 2004-11-30 21:10:31 adam Exp $
*/
#include <assert.h>
#include <signal.h>
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz++/z-assoc.h>
#include <yaz/otherinfo.h>
m_odr_in = odr_createmem (ODR_DECODE);
m_odr_out = odr_createmem (ODR_ENCODE);
m_odr_print = odr_createmem (ODR_PRINT);
- m_log = LOG_DEBUG;
+ m_log = YLOG_DEBUG;
m_APDU_file = 0;
m_APDU_fname = 0;
m_hostname = 0;
if (!z_GDU(m_odr_in, &apdu, 0, 0))
{
const char *element = odr_getelement(m_odr_in);
- yaz_log(LOG_LOG, "PDU decode failed '%s' near byte %d. Element %s",
+ yaz_log(YLOG_LOG, "PDU decode failed '%s' near byte %d. Element %s",
odr_errmsg(odr_geterror(m_odr_in)),
odr_offset(m_odr_in),
element ? element : "unknown");
- yaz_log(LOG_LOG, "PDU dump:");
+ yaz_log(YLOG_LOG, "PDU dump:");
odr_dumpBER(yaz_log_file(), buf, len);
return 0;
}
if (m_APDU_yazlog || !r)
{
if (!r)
- yaz_log (LOG_LOG, "PDU encode failed. Element %s",
+ yaz_log (YLOG_LOG, "PDU encode failed. Element %s",
element ? element : "unknown");
FILE *save = m_APDU_file;
FILE *yazf = yaz_log_file();
* Copyright (c) 2002-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-cache.cpp,v 1.9 2004-03-29 22:46:51 adam Exp $
+ * $Id: yaz-z-cache.cpp,v 1.10 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz/proto.h>
#include <yaz++/record-cache.h>
oid_to_dotstring(entry->m_record->u.databaseRecord->direct_reference, mstr1);
char mstr2[100];
oid_to_dotstring(syntax, mstr2);
- yaz_log(LOG_LOG, "match fail 3 d=%s s=%s", mstr1, mstr2);
+ yaz_log(YLOG_LOG, "match fail 3 d=%s s=%s", mstr1, mstr2);
#endif
return 0;
Z_RecordComposition *comp)
{
int i;
- yaz_log(LOG_DEBUG, "cache lookup start=%d num=%d", start, num);
+ yaz_log(YLOG_DEBUG, "cache lookup start=%d num=%d", start, num);
for (i = 0; i<num; i++)
{
* Copyright (c) 2000-2001, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-server-ill.cpp,v 1.9 2003-10-01 13:13:51 adam Exp $
+ * $Id: yaz-z-server-ill.cpp,v 1.10 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz++/z-server.h>
int Yaz_Facility_ILL::init(Yaz_Z_Server *s, Z_InitRequest *initRequest,
if (!req->taskSpecificParameters || req->taskSpecificParameters->which !=
Z_External_itemOrder)
return 0;
- yaz_log (LOG_LOG, "got ill p=%p", this);
+ yaz_log (YLOG_LOG, "got ill p=%p", this);
apdu_response = s->create_Z_PDU(Z_APDU_extendedServicesResponse);
ill_service(req, req->taskSpecificParameters->u.itemOrder,
apdu_response->u.extendedServicesResponse);
* Copyright (c) 2000-2001, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-server-sr.cpp,v 1.6 2003-10-01 13:13:51 adam Exp $
+ * $Id: yaz-z-server-sr.cpp,v 1.7 2004-11-30 21:10:31 adam Exp $
*
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz++/z-server.h>
Z_Records *Yaz_Facility_Retrieval::pack_records (Yaz_Z_Server *s,
*pres = Z_PRES_SUCCESS;
*next = 0;
- yaz_log(LOG_LOG, "Request to pack %d+%d", start, toget);
- yaz_log(LOG_LOG, "pms=%d, mrs=%d", m_preferredMessageSize,
- m_maximumRecordSize);
for (recno = start; reclist->num_records < toget; recno++)
{
Z_NamePlusRecord *this_rec =
*/
total_length = odr_total(odr_encode()) - dumped_records;
this_length = odr_total(odr_encode()) - total_length;
- yaz_log(LOG_LOG, " fetched record, len=%d, total=%d",
- this_length, total_length);
if (this_length + total_length > m_preferredMessageSize)
{
/* record is small enough, really */
if (this_length <= m_preferredMessageSize)
{
- yaz_log(LOG_LOG, " Dropped last normal-sized record");
*pres = Z_PRES_PARTIAL_2;
break;
}
if (this_length >= m_maximumRecordSize)
{ /* too big entirely */
- yaz_log(LOG_LOG, "Record > maxrcdsz");
reclist->records[reclist->num_records] = this_rec;
create_surrogateDiagnostics(odr_encode(), this_rec,
this_rec->databaseName, 17, 0);
}
else /* record can only be fetched by itself */
{
- yaz_log(LOG_LOG, " Record > prefmsgsz");
if (toget > 1)
{
- yaz_log(LOG_DEBUG, " Dropped it");
+ yaz_log(YLOG_DEBUG, " Dropped it");
reclist->records[reclist->num_records] = this_rec;
create_surrogateDiagnostics(odr_encode(), this_rec,
this_rec->databaseName,
switch (apdu_request->which)
{
case Z_APDU_searchRequest:
- yaz_log (LOG_LOG, "got SearchRequest p=%p", this);
apdu_response = s->create_Z_PDU(Z_APDU_searchResponse);
s->transfer_referenceId(apdu_request, apdu_response);
sr_search (apdu_request->u.searchRequest,
s->send_Z_PDU(apdu_response, 0);
return 1;
case Z_APDU_presentRequest:
- yaz_log (LOG_LOG, "got PresentRequest p=%p", this);
apdu_response = s->create_Z_PDU(Z_APDU_presentResponse);
s->transfer_referenceId(apdu_request, apdu_response);
sr_present (apdu_request->u.presentRequest,
* Copyright (c) 2000-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-server-update.cpp,v 1.5 2003-10-01 13:13:51 adam Exp $
+ * $Id: yaz-z-server-update.cpp,v 1.6 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz++/z-server.h>
int Yaz_Facility_Update::init(Yaz_Z_Server *s, Z_InitRequest *initRequest,
if (req->taskSpecificParameters && req->taskSpecificParameters->which ==
Z_External_update)
{
- yaz_log (LOG_LOG, "got update p=%p", this);
apdu_response = s->create_Z_PDU(Z_APDU_extendedServicesResponse);
update_service(req, req->taskSpecificParameters->u.update,
apdu_response->u.extendedServicesResponse);
else if (req->taskSpecificParameters &&
req->taskSpecificParameters->which == Z_External_update0)
{
- yaz_log (LOG_LOG, "got update p=%p", this);
apdu_response = s->create_Z_PDU(Z_APDU_extendedServicesResponse);
update_service0 (req, req->taskSpecificParameters->u.update0,
apdu_response->u.extendedServicesResponse);
* Copyright (c) 2000-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-server.cpp,v 1.18 2004-03-30 18:14:13 adam Exp $
+ * $Id: yaz-z-server.cpp,v 1.19 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz++/z-server.h>
Yaz_Z_Server::Yaz_Z_Server(IYaz_PDU_Observable *the_PDU_Observable)
}
if (!taken)
{
- yaz_log (LOG_WARN, "unhandled request = %d", apdu_request->which);
+ yaz_log (YLOG_WARN, "unhandled request = %d", apdu_request->which);
delete this;
}
}
Z_DefaultDiagFormat *dr = (Z_DefaultDiagFormat *)
odr_malloc (odr, sizeof(*dr));
- yaz_log(LOG_DEBUG, "SurrogateDiagnotic: %d -- %s", error, addinfo);
+ yaz_log(YLOG_DEBUG, "SurrogateDiagnotic: %d -- %s", error, addinfo);
*err = error;
rec->databaseName = dbname ? odr_strdup (odr, dbname) : 0;
rec->which = Z_NamePlusRecord_surrogateDiagnostic;
* Copyright (c) 2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: test-init-01.cpp,v 1.1 2004-03-25 23:14:07 adam Exp $
+ * $Id: test-init-01.cpp,v 1.2 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <zlint.h>
* Copyright (c) 2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: test-init-02.cpp,v 1.1 2004-03-25 23:14:07 adam Exp $
+ * $Id: test-init-02.cpp,v 1.2 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <zlint.h>
* Copyright (c) 2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: test-init-03.cpp,v 1.1 2004-03-25 23:14:07 adam Exp $
+ * $Id: test-init-03.cpp,v 1.2 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <zlint.h>
* Copyright (c) 2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: test-init-04.cpp,v 1.1 2004-03-25 23:14:07 adam Exp $
+ * $Id: test-init-04.cpp,v 1.2 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <zlint.h>
* Copyright (c) 2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: test-init-05.cpp,v 1.1 2004-03-25 23:14:07 adam Exp $
+ * $Id: test-init-05.cpp,v 1.2 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <zlint.h>
* Copyright (c) 2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: test-init-06.cpp,v 1.1 2004-03-25 23:14:07 adam Exp $
+ * $Id: test-init-06.cpp,v 1.2 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <zlint.h>
* Copyright (c) 2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: test-init-07.cpp,v 1.1 2004-03-25 23:14:07 adam Exp $
+ * $Id: test-init-07.cpp,v 1.2 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz/charneg.h>
#include <yaz/otherinfo.h>
* Copyright (c) 2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: test-init-08.cpp,v 1.1 2004-03-25 23:14:07 adam Exp $
+ * $Id: test-init-08.cpp,v 1.2 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz/charneg.h>
#include <yaz/otherinfo.h>
* Copyright (c) 2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: test-scan-01.cpp,v 1.1 2004-03-25 23:14:07 adam Exp $
+ * $Id: test-scan-01.cpp,v 1.2 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz/pquery.h>
#include <zlint.h>
* Copyright (c) 2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: test-search-01.cpp,v 1.2 2004-09-06 07:50:51 adam Exp $
+ * $Id: test-search-01.cpp,v 1.3 2004-11-30 21:10:31 adam Exp $
*/
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <yaz/pquery.h>
#include <yaz/sortspec.h>
* Copyright (c) 2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: zlint.cpp,v 1.6 2004-09-06 07:50:51 adam Exp $
+ * $Id: zlint.cpp,v 1.7 2004-11-30 21:10:31 adam Exp $
*/
#include <stdio.h>
#include <yaz/options.h>
#include <yaz/otherinfo.h>
#include <yaz/charneg.h>
-#include <yaz/log.h>
+#include <yaz/ylog.h>
#include <zlint.h>
{
no = i+1;
if (off)
- yaz_log(LOG_WARN, "%sbad formatted version");
+ yaz_log(YLOG_WARN, "%sbad formatted version");
}
else
off = 1;