Skip to content
Snippets Groups Projects
Commit 41b06abd authored by Michael Davis's avatar Michael Davis
Browse files

[xrd_ssi] Route all DEBUG log messages to stderr

parent e1eaa46f
Branches
Tags
No related merge requests found
...@@ -42,7 +42,7 @@ public: ...@@ -42,7 +42,7 @@ public:
AlertMsg(const AlertType &alert) : XrdSsiRespInfoMsg(nullptr, 0) AlertMsg(const AlertType &alert) : XrdSsiRespInfoMsg(nullptr, 0)
{ {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] AlertMsg() constructor" << std::endl; std::cerr << "[DEBUG] AlertMsg() constructor" << std::endl;
#endif #endif
// Serialize the Alert // Serialize the Alert
...@@ -58,7 +58,7 @@ public: ...@@ -58,7 +58,7 @@ public:
~AlertMsg() { ~AlertMsg() {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] ~AlertMsg() destructor" << std::endl; std::cerr << "[DEBUG] ~AlertMsg() destructor" << std::endl;
#endif #endif
} }
...@@ -68,8 +68,8 @@ public: ...@@ -68,8 +68,8 @@ public:
void RecycleMsg(bool sent=true) { void RecycleMsg(bool sent=true) {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] AlertMsg::RecycleMsg()" << std::endl; std::cerr << "[DEBUG] AlertMsg::RecycleMsg()" << std::endl;
std::cout << "[DEBUG] Alert \"" << alert_str << "\" was " << (sent ? "sent." : "not sent.") << std::endl; std::cerr << "[DEBUG] Alert \"" << alert_str << "\" was " << (sent ? "sent." : "not sent.") << std::endl;
#endif #endif
delete this; delete this;
} }
......
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
virtual ~Request() { virtual ~Request() {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] ~Request destructor" << std::endl; std::cerr << "[DEBUG] ~Request destructor" << std::endl;
#endif #endif
} }
...@@ -110,7 +110,7 @@ Request(const RequestType &request, unsigned int response_bufsize, uint16_t time ...@@ -110,7 +110,7 @@ Request(const RequestType &request, unsigned int response_bufsize, uint16_t time
m_response_bufsize(response_bufsize) m_response_bufsize(response_bufsize)
{ {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] Request constructor: " std::cerr << "[DEBUG] Request constructor: "
<< "Response buffer size = " << m_response_bufsize << "Response buffer size = " << m_response_bufsize
<< " bytes, timeout = " << timeout << std::endl; << " bytes, timeout = " << timeout << std::endl;
#endif #endif
...@@ -139,7 +139,7 @@ template<typename RequestType, typename MetadataType, typename AlertType> ...@@ -139,7 +139,7 @@ template<typename RequestType, typename MetadataType, typename AlertType>
bool Request<RequestType, MetadataType, AlertType>::ProcessResponse(const XrdSsiErrInfo &eInfo, const XrdSsiRespInfo &rInfo) bool Request<RequestType, MetadataType, AlertType>::ProcessResponse(const XrdSsiErrInfo &eInfo, const XrdSsiRespInfo &rInfo)
{ {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] ProcessResponse(): response type = " << rInfo.State() << std::endl; std::cerr << "[DEBUG] ProcessResponse(): response type = " << rInfo.State() << std::endl;
#endif #endif
try { try {
...@@ -231,7 +231,7 @@ void Request<RequestType, MetadataType, AlertType>::ProcessResponseMetadata() ...@@ -231,7 +231,7 @@ void Request<RequestType, MetadataType, AlertType>::ProcessResponseMetadata()
int metadata_len; int metadata_len;
const char *metadata_buffer = GetMetadata(metadata_len); const char *metadata_buffer = GetMetadata(metadata_len);
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] ProcessResponseMetadata(): received " << metadata_len << " bytes of data" << std::endl; std::cerr << "[DEBUG] ProcessResponseMetadata(): received " << metadata_len << " bytes of data" << std::endl;
#endif #endif
// Deserialize the metadata // Deserialize the metadata
...@@ -272,7 +272,7 @@ XrdSsiRequest::PRD_Xeq Request<RequestType, MetadataType, AlertType> ...@@ -272,7 +272,7 @@ XrdSsiRequest::PRD_Xeq Request<RequestType, MetadataType, AlertType>
::ProcessResponseData(const XrdSsiErrInfo &eInfo, char *response_bufptr, int response_buflen, bool is_last) ::ProcessResponseData(const XrdSsiErrInfo &eInfo, char *response_bufptr, int response_buflen, bool is_last)
{ {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] ProcessResponseData(): received " << response_buflen << " bytes of data" << std::endl; std::cerr << "[DEBUG] ProcessResponseData(): received " << response_buflen << " bytes of data" << std::endl;
#endif #endif
// The buffer length can be 0 if the response is metadata only // The buffer length can be 0 if the response is metadata only
......
...@@ -62,12 +62,12 @@ class RequestProc : public XrdSsiResponder ...@@ -62,12 +62,12 @@ class RequestProc : public XrdSsiResponder
public: public:
RequestProc(XrdSsiResource &resource) : m_resource(resource) { RequestProc(XrdSsiResource &resource) : m_resource(resource) {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] RequestProc() constructor" << std::endl; std::cerr << "[DEBUG] RequestProc() constructor" << std::endl;
#endif #endif
} }
virtual ~RequestProc() { virtual ~RequestProc() {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] ~RequestProc() destructor" << std::endl; std::cerr << "[DEBUG] ~RequestProc() destructor" << std::endl;
#endif #endif
} }
...@@ -103,7 +103,7 @@ private: ...@@ -103,7 +103,7 @@ private:
void ExecuteAction() { void ExecuteAction() {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] Called default RequestProc::ExecuteAction()" << std::endl; std::cerr << "[DEBUG] Called default RequestProc::ExecuteAction()" << std::endl;
#endif #endif
} }
...@@ -140,7 +140,7 @@ void RequestProc<RequestType, MetadataType, AlertType>::Execute() ...@@ -140,7 +140,7 @@ void RequestProc<RequestType, MetadataType, AlertType>::Execute()
//< In any case it should be <= timeout on the client side? //< In any case it should be <= timeout on the client side?
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] RequestProc::Execute()" << std::endl; std::cerr << "[DEBUG] RequestProc::Execute()" << std::endl;
#endif #endif
// Deserialize the Request // Deserialize the Request
...@@ -216,7 +216,7 @@ template <typename RequestType, typename MetadataType, typename AlertType> ...@@ -216,7 +216,7 @@ template <typename RequestType, typename MetadataType, typename AlertType>
void RequestProc<RequestType, MetadataType, AlertType>::Finished(XrdSsiRequest &rqstR, const XrdSsiRespInfo &rInfo, bool cancel) void RequestProc<RequestType, MetadataType, AlertType>::Finished(XrdSsiRequest &rqstR, const XrdSsiRespInfo &rInfo, bool cancel)
{ {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] RequestProc::Finished()" << std::endl; std::cerr << "[DEBUG] RequestProc::Finished()" << std::endl;
#endif #endif
if(cancel) if(cancel)
......
...@@ -35,12 +35,12 @@ class Service : public XrdSsiService ...@@ -35,12 +35,12 @@ class Service : public XrdSsiService
public: public:
Service() { Service() {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] Service() constructor" << std::endl; std::cerr << "[DEBUG] Service() constructor" << std::endl;
#endif #endif
} }
virtual ~Service() { virtual ~Service() {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] ~Service() destructor" << std::endl; std::cerr << "[DEBUG] ~Service() destructor" << std::endl;
#endif #endif
} }
...@@ -54,7 +54,7 @@ public: ...@@ -54,7 +54,7 @@ public:
virtual bool Stop() override virtual bool Stop() override
{ {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] Service::Stop()" << std::endl; std::cerr << "[DEBUG] Service::Stop()" << std::endl;
#endif #endif
return false; return false;
} }
...@@ -67,7 +67,7 @@ public: ...@@ -67,7 +67,7 @@ public:
virtual bool Prepare(XrdSsiErrInfo &eInfo, const XrdSsiResource &resource) override virtual bool Prepare(XrdSsiErrInfo &eInfo, const XrdSsiResource &resource) override
{ {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] Service::Prepare():" << std::endl; std::cerr << "[DEBUG] Service::Prepare():" << std::endl;
std::cerr << "[DEBUG] Resource name: " << resource.rName << std::endl std::cerr << "[DEBUG] Resource name: " << resource.rName << std::endl
<< "[DEBUG] Resource user: " << resource.rUser << std::endl << "[DEBUG] Resource user: " << resource.rUser << std::endl
<< "[DEBUG] Resource info: " << resource.rInfo << std::endl << "[DEBUG] Resource info: " << resource.rInfo << std::endl
...@@ -108,7 +108,7 @@ public: ...@@ -108,7 +108,7 @@ public:
XrdSsiRequest &reqRef, XrdSsiResource *resp) override XrdSsiRequest &reqRef, XrdSsiResource *resp) override
{ {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] Service::Attach()" << std::endl; std::cerr << "[DEBUG] Service::Attach()" << std::endl;
#endif #endif
return true; return true;
} }
...@@ -131,7 +131,7 @@ void Service<RequestType, MetadataType, AlertType>::ProcessRequest(XrdSsiRequest ...@@ -131,7 +131,7 @@ void Service<RequestType, MetadataType, AlertType>::ProcessRequest(XrdSsiRequest
// Bind the processor to the request. Inherits the BindRequest method from XrdSsiResponder. // Bind the processor to the request. Inherits the BindRequest method from XrdSsiResponder.
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] XrdSsiPbService::ProcessRequest(): Binding Processor to Request" << std::endl; std::cerr << "[DEBUG] XrdSsiPbService::ProcessRequest(): Binding Processor to Request" << std::endl;
#endif #endif
processor.BindRequest(reqRef); processor.BindRequest(reqRef);
...@@ -142,7 +142,7 @@ void Service<RequestType, MetadataType, AlertType>::ProcessRequest(XrdSsiRequest ...@@ -142,7 +142,7 @@ void Service<RequestType, MetadataType, AlertType>::ProcessRequest(XrdSsiRequest
// Tell the framework we have finished with the request object: unbind the request from the responder // Tell the framework we have finished with the request object: unbind the request from the responder
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] XrdSsiPbService::ProcessRequest(): Unbinding Processor from Request" << std::endl; std::cerr << "[DEBUG] XrdSsiPbService::ProcessRequest(): Unbinding Processor from Request" << std::endl;
#endif #endif
processor.UnBindRequest(); processor.UnBindRequest();
......
...@@ -85,7 +85,7 @@ ServiceClientSide(const std::string &endpoint, const std::string &resource, ...@@ -85,7 +85,7 @@ ServiceClientSide(const std::string &endpoint, const std::string &resource,
m_server_tmo(server_tmo) m_server_tmo(server_tmo)
{ {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] ServiceClientSide() constructor" << std::endl; std::cerr << "[DEBUG] ServiceClientSide() constructor" << std::endl;
#endif #endif
XrdSsiErrInfo eInfo; XrdSsiErrInfo eInfo;
...@@ -125,7 +125,7 @@ template <typename RequestType, typename MetadataType, typename AlertType> ...@@ -125,7 +125,7 @@ template <typename RequestType, typename MetadataType, typename AlertType>
ServiceClientSide<RequestType, MetadataType, AlertType>::~ServiceClientSide() ServiceClientSide<RequestType, MetadataType, AlertType>::~ServiceClientSide()
{ {
#ifdef XRDSSI_DEBUG #ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] ServiceClientSide() destructor" << std::endl; std::cerr << "[DEBUG] ServiceClientSide() destructor" << std::endl;
if(!m_server_ptr->Stop()) if(!m_server_ptr->Stop())
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment