Skip to content
Snippets Groups Projects
Commit ba90ca66 authored by Steven Murray's avatar Steven Murray
Browse files

Improved logging

parent eacf85bc
Branches
Tags
No related merge requests found
/* This file was generated by ./AggregatorDlfMessagesCodeGenerator on Mon Mar 9 14:51:10 CET 2009
/* This file was generated by ./AggregatorDlfMessagesCodeGenerator on Tue Mar 10 10:33:50 CET 2009
*/
/******************************************************************************
......@@ -95,7 +95,8 @@ AGGREGATOR_GAVE_MIGRATE_FILE_TO_RTCPD=58, /* "Gave migrate file to RTCPD" */
AGGREGATOR_NO_MORE_FILES_TO_MIGRATE=59, /* "No more files to migrate" */
AGGREGATOR_NO_MORE_FILES_TO_RECALL=60, /* "No more files to recall" */
AGGREGATOR_FILE_TO_MIGRATE=61, /* "File to migrate" */
AGGREGATOR_FILE_TO_RECALL=62 /* "File to recall" */
AGGREGATOR_FILE_TO_RECALL=62, /* "File to recall" */
AGGREGATOR_PROCESSING_TAPE_DISK_RQST=63 /* "Processing a tape/disk IO request from RTCPD" */
}; // enum AggregatorDlfMessages
} // namespace aggregator
} // namespace tape
......
/* This file was generated by ./AggregatorDlfMessagesCodeGenerator on Mon Mar 9 14:51:10 CET 2009
/* This file was generated by ./AggregatorDlfMessagesCodeGenerator on Tue Mar 10 10:33:50 CET 2009
*/
/******************************************************************************
......@@ -92,4 +92,5 @@ castor::dlf::Message castor::tape::aggregator::AggregatorDaemon::s_dlfMessages[]
{AGGREGATOR_NO_MORE_FILES_TO_RECALL, "No more files to recall"},
{AGGREGATOR_FILE_TO_MIGRATE, "File to migrate"},
{AGGREGATOR_FILE_TO_RECALL, "File to recall"},
{AGGREGATOR_PROCESSING_TAPE_DISK_RQST, "Processing a tape/disk IO request from RTCPD"},
{-1, ""}};
......@@ -61,3 +61,4 @@
60,AGGREGATOR_NO_MORE_FILES_TO_RECALL,"No more files to recall"
61,AGGREGATOR_FILE_TO_MIGRATE,"File to migrate"
62,AGGREGATOR_FILE_TO_RECALL,"File to recall"
63,AGGREGATOR_PROCESSING_TAPE_DISK_RQST,"Processing a tape/disk IO request from RTCPD"
......@@ -68,6 +68,32 @@ bool castor::tape::aggregator::TapeDiskRqstHandler::processRequest(
RtcpTxRx::receiveRtcpMsgHeader(cuuid, volReqId, socketFd, RTCPDNETRWTIMEOUT,
header);
{
char magicHex[2 + 17]; // 0 + x + FFFFFFFFFFFFFFFF + '\0'
magicHex[0] = '0';
magicHex[1] = 'x';
Utils::toHex(header.magic, &(magicHex[2]), 17);
const char *magicName = Utils::magicToStr(header.magic);
char reqTypeHex[2 + 17]; // 0 + x + FFFFFFFFFFFFFFFF + '\0'
reqTypeHex[0] = '0';
reqTypeHex[1] = 'x';
Utils::toHex(header.reqType, &(reqTypeHex[2]), 17);
const char *reqTypeName = Utils::rtcopyReqTypeToStr(header.reqType);
castor::dlf::Param params[] = {
castor::dlf::Param("volReqId" , volReqId ),
castor::dlf::Param("magic" , magicHex ),
castor::dlf::Param("magicName" , magicName ),
castor::dlf::Param("reqType" , reqTypeHex ),
castor::dlf::Param("reqTypeName", reqTypeName),
castor::dlf::Param("len" , header.len )};
castor::dlf::dlf_writep(cuuid, DLF_LVL_SYSTEM,
AGGREGATOR_PROCESSING_TAPE_DISK_RQST, params);
}
// Find the message type's corresponding handler
MsgBodyHandlerMap::iterator itor = m_handlers.find(header.reqType);
if(itor == m_handlers.end()) {
......
......@@ -75,8 +75,6 @@ void castor::tape::aggregator::Utils::toHex(const uint64_t i, char *dst,
}
}
std::cout << "nbDigits=" << nbDigits << std::endl;
for(int d=0; d<nbDigits;d++) {
dst[d] = backwardsHexDigits[nbDigits-1-d];
}
......
......@@ -92,7 +92,10 @@ public:
* fill it with 64-bit hexadecimal string.
*
* @param i The unsigned 64-bit integer.
* @param dst The destination character array.
* @param dst The destination character array which should have a minimum
* length of 17 characters. The largest 64-bit hexadecimal string
* "FFFFFFFFFFFFFFFF" would ocuppy 17 characters (17 * characters =
* 16 x 'F' + 1 x '\0').
* @param dstLen The length of the destination character string.
*/
static void toHex(const uint64_t i, char *dst, size_t dstLen)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment