projects
/
metaproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added checking of pointers before dereferencing
[metaproxy-moved-to-github.git]
/
src
/
filter_log.cpp
diff --git
a/src/filter_log.cpp
b/src/filter_log.cpp
index
95f6600
..
a1baf48
100644
(file)
--- a/
src/filter_log.cpp
+++ b/
src/filter_log.cpp
@@
-1,9
+1,10
@@
-/* $Id: filter_log.cpp,v 1.23 2006-08-29 10:06:31 marc Exp $
+/* $Id: filter_log.cpp,v 1.26 2006-08-31 12:56:40 marc Exp $
Copyright (c) 2005-2006, Index Data.
See the LICENSE file for details
*/
Copyright (c) 2005-2006, Index Data.
See the LICENSE file for details
*/
+#include "filter_log.hpp"
#include "config.hpp"
#include "package.hpp"
#include "config.hpp"
#include "package.hpp"
@@
-15,7
+16,6
@@
#include "gduutil.hpp"
#include "util.hpp"
#include "xmlutil.hpp"
#include "gduutil.hpp"
#include "util.hpp"
#include "xmlutil.hpp"
-#include "filter_log.hpp"
#include <fstream>
#include <yaz/zgdu.h>
#include <fstream>
#include <yaz/zgdu.h>
@@
-58,10
+58,11
@@
namespace metaproxy_1 {
yf::Log::Rep::Rep()
{
yf::Log::Rep::Rep()
{
- m_req_apdu = true;
- m_res_apdu = true;
- m_req_session = true;
- m_res_session = true;
+ m_access = true;
+ m_req_apdu = false;
+ m_res_apdu = false;
+ m_req_session = false;
+ m_res_session = false;
m_init_options = false;
openfile("");
}
m_init_options = false;
openfile("");
}
@@
-98,10
+99,6
@@
void yf::Log::process(mp::Package &package) const
= boost::posix_time::microsec_clock::local_time();
= boost::posix_time::microsec_clock::local_time();
- std::ostringstream msg_request;
- std::ostringstream msg_request_2;
- std::ostringstream msg_response;
- std::ostringstream msg_response_2;
// scope for locking Ostream
{
// scope for locking Ostream
{
@@
-114,10
+111,12
@@
void yf::Log::process(mp::Package &package) const
if (gdu)
{
m_p->m_file->out
if (gdu)
{
m_p->m_file->out
+ //<< receive_time << " "
+ //<< to_iso_string(receive_time) << " "
+ << to_iso_extended_string(receive_time) << " "
<< m_p->m_msg_config << " "
<< m_p->m_msg_config << " "
- << package.session().id() << " "
- << receive_time << " "
- << "00:00:00.000000" << " "
+ << package << " "
+ << "000000.000000" << " "
<< *gdu
<< "\n";
}
<< *gdu
<< "\n";
}
@@
-178,10
+177,12
@@
void yf::Log::process(mp::Package &package) const
if (gdu)
{
m_p->m_file->out
if (gdu)
{
m_p->m_file->out
+ //<< send_time << " "
+ //<< to_iso_string(send_time) << " "
+ << to_iso_extended_string(send_time) << " "
<< m_p->m_msg_config << " "
<< m_p->m_msg_config << " "
- << package.session().id() << " "
- << send_time << " "
- << duration << " "
+ << package << " "
+ << to_iso_string(duration) << " "
<< *gdu
<< "\n";
}
<< *gdu
<< "\n";
}