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
In tests use BOOST_AUTO_UNIT_TEST instead of BOOST_AUTO_TEST_CASE
[metaproxy-moved-to-github.git]
/
src
/
filter_log.cpp
diff --git
a/src/filter_log.cpp
b/src/filter_log.cpp
index
2cc54a4
..
cb3b67d
100644
(file)
--- a/
src/filter_log.cpp
+++ b/
src/filter_log.cpp
@@
-1,4
+1,4
@@
-/* $Id: filter_log.cpp,v 1.6 2005-10-25 11:48:30 adam Exp $
+/* $Id: filter_log.cpp,v 1.8 2005-10-30 17:13:36 adam Exp $
Copyright (c) 2005, Index Data.
%LICENSE%
Copyright (c) 2005, Index Data.
%LICENSE%
@@
-11,6
+11,7
@@
#include "router.hpp"
#include "package.hpp"
#include "router.hpp"
#include "package.hpp"
+#include "util.hpp"
#include "filter_log.hpp"
#include <yaz/zgdu.h>
#include "filter_log.hpp"
#include <yaz/zgdu.h>
@@
-21,6
+22,7
@@
yp2::filter::Log::Log() {}
yp2::filter::Log::Log() {}
+yp2::filter::Log::Log(const std::string &msg) : m_msg(msg) {}
void yp2::filter::Log::process(Package &package) const {
void yp2::filter::Log::process(Package &package) const {
@@
-41,9
+43,8
@@
void yp2::filter::Log::process(Package &package) const {
gdu = package.request().get();
if (gdu)
{
gdu = package.request().get();
if (gdu)
{
- ODR odr = odr_createmem(ODR_PRINT);
+ yp2::odr odr(ODR_PRINT);
z_GDU(odr, &gdu, 0, 0);
z_GDU(odr, &gdu, 0, 0);
- odr_destroy(odr);
}
}
}
}
@@
-68,20
+69,13
@@
void yp2::filter::Log::process(Package &package) const {
//<< "duration=" << duration.total_seconds()
// << "." << duration.fractional_seconds()
// << "\n";
//<< "duration=" << duration.total_seconds()
// << "." << duration.fractional_seconds()
// << "\n";
+ gdu = package.response().get();
+ if (gdu)
+ {
+ yp2::odr odr(ODR_PRINT);
+ z_GDU(odr, &gdu, 0, 0);
+ }
}
}
-
- gdu = package.response().get();
- if (gdu)
- {
- ODR odr = odr_createmem(ODR_PRINT);
- z_GDU(odr, &gdu, 0, 0);
- odr_destroy(odr);
- }
-}
-
-void yp2::filter::Log::set_prefix(const std::string &msg)
-{
- m_msg = msg;
}
// defining and initializing static members
}
// defining and initializing static members