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

[xrd_ssi] Route all DEBUG log messages to stderr

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