* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: seshigh.c,v 1.93 2006-07-07 12:40:15 marc Exp $
+ * $Id: seshigh.c,v 1.94 2006-07-07 13:02:21 marc Exp $
*/
/**
* \file seshigh.c
/* dynamic logging levels */
static int logbits_set = 0;
-static int log_session = 0;
+static int log_session = 0; /* one-line logs for session */
+static int log_sessiondetail = 0; /* more detailed stuff */
static int log_request = 0; /* one-line logs for requests */
static int log_requestdetail = 0; /* more detailed stuff */
{
logbits_set = 1;
log_session = yaz_log_module_level("session");
+ log_sessiondetail = yaz_log_module_level("sessiondetail");
log_request = yaz_log_module_level("request");
log_requestdetail = yaz_log_module_level("requestdetail");
}
}
else
{
- yaz_log(log_session, "Session idle too long. Sending close.");
+ yaz_log(log_sessiondetail,
+ "Session idle too long. Sending close.");
do_close(assoc, Z_Close_lackOfActivity, 0);
}
return;
/* We aren't speaking to this fellow */
if (assoc->state == ASSOC_DEAD)
{
- yaz_log(log_session, "Connection closed - end of session");
+ yaz_log(log_sessiondetail, "Connection closed - end of session");
cs_close(conn);
destroy_association(assoc);
iochan_destroy(h);
if ((res = cs_get(conn, &assoc->input_buffer,
&assoc->input_buffer_len)) <= 0)
{
- yaz_log(log_session, "Connection closed by client");
+ yaz_log(log_sessiondetail, "Connection closed by client");
cs_close(conn);
destroy_association(assoc);
iochan_destroy(h);
switch (res = cs_put(conn, req->response, req->len_response))
{
case -1:
- yaz_log(log_session, "Connection closed by client");
+ yaz_log(log_sessiondetail, "Connection closed by client");
cs_close(conn);
destroy_association(assoc);
iochan_destroy(h);
assoc->init->implementation_name,
odr_prepend(assoc->encode, "GFS", resp->implementationName));
- version = odr_strdup(assoc->encode, "$Revision: 1.93 $");
+ version = odr_strdup(assoc->encode, "$Revision: 1.94 $");
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
resp->implementationVersion = odr_prepend(assoc->encode,
* NT threaded server code by
* Chas Woodfield, Fretwell Downing Informatics.
*
- * $Id: statserv.c,v 1.39 2006-07-06 10:17:54 adam Exp $
+ * $Id: statserv.c,v 1.40 2006-07-07 13:02:21 marc Exp $
*/
/**
static int max_sessions = 0;
static int logbits_set = 0;
-static int log_session = 0;
+static int log_session = 0; /* one-line logs for session */
+static int log_sessiondetail = 0; /* more detailed stuff */
static int log_server = 0;
/** get_logbits sets global loglevel bits */
{
logbits_set = 1;
log_session = yaz_log_module_level("session");
+ log_sessiondetail = yaz_log_module_level("sessiondetail");
log_server = yaz_log_module_level("server");
}
}
return;
}
- yaz_log(log_session, "Connect from %s", cs_addrstr(new_line));
+ yaz_log(log_sessiondetail, "Connect from %s", cs_addrstr(new_line));
no_sessions++;
if (control_block.dynamic)
#else
a = 0;
#endif
- yaz_log(log_session, "Starting session %d from %s (pid=%ld)",
+ yaz_log(log_session, "Session - OK %d %s %ld",
no_sessions, a ? a : "[Unknown]", (long) getpid());
if (max_sessions && no_sessions >= max_sessions)
control_block.one_shot = 1;
iochan_setdata(chan, assoc);
iochan_settimeout(chan, 60);
addr = cs_addrstr(line);
- yaz_log(log_session, "Inetd association from %s",
+ yaz_log(log_sessiondetail, "Inetd association from %s",
addr ? addr : "[UNKNOWN]");
assoc->cs_get_mask = EVENT_INPUT;
}