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
Fix Metaproxy stops logging after check config failed MP-590
[metaproxy-moved-to-github.git]
/
src
/
filter_log.cpp
diff --git
a/src/filter_log.cpp
b/src/filter_log.cpp
index
9818696
..
2035b09
100644
(file)
--- a/
src/filter_log.cpp
+++ b/
src/filter_log.cpp
@@
-1,5
+1,5
@@
/* This file is part of Metaproxy.
/* This file is part of Metaproxy.
- Copyright (C) 2005-2013 Index Data
+ Copyright (C) Index Data
Metaproxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Metaproxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
@@
-72,11
+72,6
@@
namespace metaproxy_1 {
bool m_init_options;
LFilePtr m_file;
std::string m_time_format;
bool m_init_options;
LFilePtr m_file;
std::string m_time_format;
- // Only used during confiqgure stage (no threading),
- // for performance avoid opening files which other log filter
- // instances already have opened
- static std::list<LFilePtr> filter_log_files;
-
boost::mutex m_session_mutex;
std::map<mp::Session, std::string> m_sessions;
};
boost::mutex m_session_mutex;
std::map<mp::Session, std::string> m_sessions;
};
@@
-93,7
+88,7
@@
namespace metaproxy_1 {
std::ostringstream &os);
void flush();
};
std::ostringstream &os);
void flush();
};
-
+ static std::list<yf::Log::Impl::LFilePtr> filter_log_files;
}
}
}
}
@@
-123,10
+118,6
@@
void yf::Log::process(mp::Package &package) const
}
}
-// static initialization
-std::list<yf::Log::Impl::LFilePtr> yf::Log::Impl::filter_log_files;
-
-
yf::Log::Impl::Impl(const std::string &x)
: m_msg_config(x),
m_1line(false),
yf::Log::Impl::Impl(const std::string &x)
: m_msg_config(x),
m_1line(false),
@@
-614,7
+605,8
@@
void yf::Log::Impl::process(mp::Package &package)
Z_IdAuthentication *a = req->idAuthentication;
if (a)
{
Z_IdAuthentication *a = req->idAuthentication;
if (a)
{
- if (a->which == Z_IdAuthentication_idPass)
+ if (a->which == Z_IdAuthentication_idPass
+ && a->u.idPass->userId)
user = a->u.idPass->userId;
else if (a->which == Z_IdAuthentication_open)
user = a->u.open;
user = a->u.idPass->userId;
else if (a->which == Z_IdAuthentication_open)
user = a->u.open;
@@
-700,6
+692,8
@@
void yf::Log::Impl::process(mp::Package &package)
Z_GDU *gdu_res = package.response().get();
Z_GDU *gdu_res = package.response().get();
+ gdu_req = package.request().get();
+
yaz_timing_stop(timer);
double duration = yaz_timing_get_real(timer);
yaz_timing_stop(timer);
double duration = yaz_timing_get_real(timer);