#include <yazpp/limit-connect.h>
#include <yaz/timing.h>
#include <yaz/log.h>
+#include "gduutil.hpp"
#include <iostream>
void failNotify();
void timeoutNotify();
- void connectNotify();
+ void connectNotify();
private:
mp::ThreadPoolSocketObserver *m_thread_pool_observer;
const mp::Package *m_package;
{
yaz_timing_stop(timer);
double duration = yaz_timing_get_real(timer);
+ Z_GDU *z_gdu = gdu->get();
std::ostringstream os;
os << m_msg_config << " "
<< *m_package << " "
- << std::fixed << std::setprecision (6) << duration;
+ << std::fixed << std::setprecision (6) << duration << " ";
+
+ if (z_gdu)
+ os << *z_gdu;
+ else
+ os << "-";
yaz_log(YLOG_LOG, "%s %s", os.str().c_str(), t_info);
}
m_msg_config);
p->copy_route(*m_package);
p->request() = yazpp_1::GDU(z_pdu);
+
+ if (m_msg_config)
+ {
+ if (z_pdu)
+ {
+ std::ostringstream os;
+ os << m_msg_config << " "
+ << *p << " "
+ << "0.000000" << " "
+ << *z_pdu;
+ yaz_log(YLOG_LOG, "%s", os.str().c_str());
+ }
+ }
m_thread_pool_observer->put(tp);
}
}
while (m_p->mySocketManager.processEvent() > 0)
{
+ int no = m_p->mySocketManager.getNumberOfObservers();
+ if (no <= 1)
+ break;
if (tt && tt->timeout())
break;
}