Commit 536c2f16 authored by Cedric CAFFY's avatar Cedric CAFFY
Browse files

Unified keys in log files : vid -> tapeVid, unitName -> tapeDrive, TPVID -> tapeVid

parent 2a1bbf46
......@@ -111,7 +111,7 @@ std::unique_ptr<common::dataStructures::ArchiveFile> ArchiveFileBuilder::append(
params.push_back(cta::log::Param("archiveFileID", tapeFile.archiveFileID));
params.push_back(cta::log::Param("duplicateCopyNb", copyNbOfTapeFileToAppend));
params.push_back(cta::log::Param("workaroundCopyNb", workaroundCopyNb));
params.push_back(cta::log::Param("vid", vid));
params.push_back(cta::log::Param("tapeVid", vid));
params.push_back(cta::log::Param("fSeq", fSeq));
params.push_back(cta::log::Param("blockId", blockId));
m_log(cta::log::WARNING, "Found a duplicate tape copy number when listing archive files", params);
......
......@@ -34,7 +34,7 @@ MmcProxy::MmcProxy(log::Logger &log):
//------------------------------------------------------------------------------
void MmcProxy::mountTapeReadOnly( const std::string &vid, const LibrarySlot &librarySlot) {
std::list<log::Param> params = {
log::Param("TPVID", vid),
log::Param("tapeVid", vid),
log::Param("librarySlot", librarySlot.str())};
m_log(log::WARNING, "Tape should be manual mounted for read-only access", params);
}
......@@ -44,7 +44,7 @@ void MmcProxy::mountTapeReadOnly( const std::string &vid, const LibrarySlot &lib
//------------------------------------------------------------------------------
void MmcProxy::mountTapeReadWrite(const std::string &vid, const LibrarySlot &librarySlot) {
std::list<log::Param> params = {
log::Param("TPVID", vid),
log::Param("tapeVid", vid),
log::Param("librarySlot", librarySlot.str())};
m_log(log::WARNING, "Tape should be manual mounted for read/write access", params);
}
......@@ -54,7 +54,7 @@ void MmcProxy::mountTapeReadWrite(const std::string &vid, const LibrarySlot &lib
//------------------------------------------------------------------------------
void MmcProxy::dismountTape( const std::string &vid, const LibrarySlot &librarySlot) {
std::list<log::Param> params = {
log::Param("TPVID", vid),
log::Param("tapeVid", vid),
log::Param("librarySlot", librarySlot.str())};
m_log(log::WARNING, "Tape should be manual dismounted", params);
}
......@@ -64,7 +64,7 @@ void MmcProxy::dismountTape( const std::string &vid, const LibrarySlot &libraryS
//------------------------------------------------------------------------------
void MmcProxy::forceDismountTape(const std::string &vid, const LibrarySlot &librarySlot) {
std::list<log::Param> params = {
log::Param("TPVID", vid),
log::Param("tapeVid", vid),
log::Param("librarySlot", librarySlot.str())};
m_log(log::WARNING, "Tape should be manual dismounted", params);
}
......
......@@ -232,7 +232,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler::
const uint32_t panel = rqstBody.panel();
const uint32_t drive = rqstBody.drive();
std::list<log::Param> params = {log::Param("TPVID", vid),
std::list<log::Param> params = {log::Param("tapeVid", vid),
log::Param("acs", acs),
log::Param("lsm", lsm),
log::Param("panel", panel),
......@@ -277,7 +277,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler::
const uint32_t panel = rqstBody.panel();
const uint32_t drive = rqstBody.drive();
std::list<log::Param> params = {log::Param("TPVID", vid),
std::list<log::Param> params = {log::Param("tapeVid", vid),
log::Param("acs", acs),
log::Param("lsm", lsm),
log::Param("panel", panel),
......@@ -322,7 +322,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler::
const uint32_t panel = rqstBody.panel();
const uint32_t drive = rqstBody.drive();
std::list<log::Param> params = {log::Param("TPVID", vid),
std::list<log::Param> params = {log::Param("tapeVid", vid),
log::Param("acs", acs),
log::Param("lsm", lsm),
log::Param("panel", panel),
......@@ -371,7 +371,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler::
const uint32_t panel = rqstBody.panel();
const uint32_t drive = rqstBody.drive();
std::list<log::Param> params = {log::Param("TPVID", vid),
std::list<log::Param> params = {log::Param("tapeVid", vid),
log::Param("acs", acs),
log::Param("lsm", lsm),
log::Param("panel", panel),
......
......@@ -121,7 +121,7 @@ void cta::mediachanger::acs::daemon::AcsPendingRequests::handleCompletedRequests
itor != m_acsRequestList.end();itor++) {
cta::mediachanger::acs::daemon::AcsRequest *const acsRequest = *itor;
if (acsRequest->isCompleted()) {
std::list<log::Param> params = {log::Param("TPVID", acsRequest->getVid()),
std::list<log::Param> params = {log::Param("tapeVid", acsRequest->getVid()),
log::Param("acs", acsRequest->getAcs()),
log::Param("lsm", acsRequest->getLsm()),
log::Param("panel", acsRequest->getPanel()),
......@@ -143,7 +143,7 @@ void cta::mediachanger::acs::daemon::AcsPendingRequests::handleFailedRequests()
itor != m_acsRequestList.end();itor++) {
cta::mediachanger::acs::daemon::AcsRequest *const acsRequest = *itor;
if (acsRequest->isFailed()) {
std::list<log::Param> params = {log::Param("TPVID", acsRequest->getVid()),
std::list<log::Param> params = {log::Param("tapeVid", acsRequest->getVid()),
log::Param("acs", acsRequest->getAcs()),
log::Param("lsm", acsRequest->getLsm()),
log::Param("panel", acsRequest->getPanel()),
......@@ -231,7 +231,7 @@ void cta::mediachanger::acs::daemon::AcsPendingRequests::checkAndAddRequestDismo
checkRequest(vid, acs, lsm, panel, drive);
std::list<log::Param> params = {log::Param("TPVID", vid),
std::list<log::Param> params = {log::Param("tapeVid", vid),
log::Param("acs", acs),
log::Param("lsm", lsm),
log::Param("panel", panel),
......
......@@ -348,7 +348,7 @@ void GarbageCollector::OwnedObjectSorter::sortFetchedObjects(Agent& agent, std::
for (auto & tc: rr->getArchiveFile().tapeFiles) { if (tc.second.vid==vid) { copyNb=tc.first; fSeq=tc.second.fSeq; } }
params3.add("fileId", rr->getArchiveFile().archiveFileID)
.add("copyNb", copyNb)
.add("vid", vid)
.add("tapeVid", vid)
.add("fSeq", fSeq);
lc.log(log::INFO, "Selected vid to be requeued for retrieve request.");
break;
......@@ -626,7 +626,7 @@ void GarbageCollector::OwnedObjectSorter::lockFetchAndUpdateRetrieveJobs(Agent&
params.add("retrieveRequestObject", rrup.retrieveRequest->getAddressIfSet())
.add("copyNb", rrup.copyNb)
.add("fileId", rrup.retrieveRequest->getArchiveFile().archiveFileID)
.add("vid", tape.first)
.add("tapeVid", tape.first)
.add("retreveQueueObject", rq.getAddressIfSet())
.add("garbageCollectedPreviousOwner", agent.getAddressIfSet());
lc.log(log::INFO, "In GarbageCollector::OwnedObjectSorter::lockFetchAndUpdateRetrieveJobs(): requeued retrieve job.");
......@@ -675,7 +675,7 @@ void GarbageCollector::OwnedObjectSorter::lockFetchAndUpdateRetrieveJobs(Agent&
{
log::ScopedParamContainer params(lc);
auto jobsSummary = rq.getJobsSummary();
params.add("vid", tape.first)
params.add("tapeVid", tape.first)
.add("retrieveQueueObject", rq.getAddressIfSet())
.add("filesAdded", filesQueued - filesDequeued)
.add("bytesAdded", bytesQueued - bytesDequeued)
......
......@@ -229,7 +229,7 @@ void Helpers::getLockedAndFetchedQueue<RetrieveQueue>(RetrieveQueue& retrieveQue
rootQueueDereferenceTime += t.secs(utils::Timer::resetCounter);
log::ScopedParamContainer params(lc);
params.add("vid", vid)
params.add("tapeVid", vid)
.add("queueObject", retrieveQueue.getAddressIfSet())
.add("exceptionMsg", ex.getMessageValue());
lc.log(log::INFO, "In Helpers::getLockedAndFetchedQueue<RetrieveQueue>(): removed reference to gone retrieve queue from root entry.");
......
......@@ -158,7 +158,7 @@ jobFound:;
params.add("jobObject", getAddressIfSet())
.add("queueObject", rq.getAddressIfSet())
.add("copynb", bestTapeFile->copynb())
.add("vid", bestTapeFile->vid())
.add("tapeVid", bestTapeFile->vid())
.add("tapeSelectionTime", tapeSelectionTime)
.add("queueUpdateTime", queueUpdateTime)
.add("commitUnlockQueueTime", commitUnlockQueueTime);
......@@ -181,7 +181,7 @@ jobFound:;
params.add("jobObject", getAddressIfSet())
.add("queueObject", rq.getAddressIfSet())
.add("copynb", bestTapeFile->copynb())
.add("vid", bestTapeFile->vid())
.add("tapeVid", bestTapeFile->vid())
.add("tapeSelectionTime", tapeSelectionTime)
.add("queueUpdateTime", queueUpdateTime)
.add("commitUnlockQueueTime", commitUnlockQueueTime)
......
......@@ -380,7 +380,7 @@ void RootEntry::removeRetrieveQueueAndCommit(const std::string& vid, QueueType q
commit();
{
log::ScopedParamContainer params(lc);
params.add("vid", vid);
params.add("tapeVid", vid);
lc.log(log::INFO, "In RootEntry::removeRetrieveQueueAndCommit(): removed retrieve queue reference.");
}
} catch (serializers::NotFound &) {
......
......@@ -340,7 +340,7 @@ std::shared_ptr<SharedQueueLock<Queue, Request>> MemQueue<Request, Queue>::share
.add("tapepool", queueIndex);
} else if (typeid(Queue) == typeid(objectstore::RetrieveQueue)) {
params.add("type", "Retrieve")
.add("vid", queueIndex);
.add("tapeVid", queueIndex);
}
params.add("objectQueue", queue.getAddressIfSet())
.add("jobsBefore", qJobsBefore)
......
......@@ -237,7 +237,7 @@ void OStoreDB::fetchMountInfo(SchedulerDatabase::TapeMountDecisionInfo& tmdi, Ro
log::LogContext lc(m_logger);
log::ScopedParamContainer params (lc);
params.add("queueObject", rqp.address)
.add("vid", rqp.vid)
.add("tapeVid", rqp.vid)
.add("exceptionMessage", ex.getMessageValue());
lc.log(log::WARNING, "In OStoreDB::fetchMountInfo(): failed to lock/fetch a retrieve queue. Skipping it.");
continue;
......@@ -262,7 +262,7 @@ void OStoreDB::fetchMountInfo(SchedulerDatabase::TapeMountDecisionInfo& tmdi, Ro
auto processingTime = t.secs(utils::Timer::resetCounter);
log::ScopedParamContainer params (logContext);
params.add("queueObject", rqp.address)
.add("vid", rqp.vid)
.add("tapeVid", rqp.vid)
.add("queueLockTime", queueLockTime)
.add("queueFetchTime", queueFetchTime)
.add("processingTime", processingTime);
......@@ -412,7 +412,7 @@ void OStoreDB::trimEmptyQueues(log::LogContext& lc) {
rql.release();
re.removeRetrieveQueueAndCommit(r.vid, QueueType::LiveJobs, lc);
log::ScopedParamContainer params(lc);
params.add("vid", r.vid)
params.add("tapeVid", r.vid)
.add("queueObject", r.address);
lc.log(log::INFO, "In OStoreDB::trimEmptyQueues(): deleted empty retrieve queue.");
}
......@@ -772,7 +772,7 @@ std::string OStoreDB::queueRetrieve(const cta::common::dataStructures::RetrieveR
uint64_t taskQueueSize = m_taskQueueSize;
// Prepare the logs to avoid multithread access on the object.
log::ScopedParamContainer params(logContext);
params.add("vid", bestVid)
params.add("tapeVid", bestVid)
.add("jobObject", rReq->getAddressIfSet())
.add("fileId", rReq->getArchiveFile().archiveFileID)
.add("diskInstance", rReq->getArchiveFile().diskInstance)
......@@ -817,7 +817,7 @@ std::string OStoreDB::queueRetrieve(const cta::common::dataStructures::RetrieveR
m_agentReference->removeFromOwnership(rReq->getAddressIfSet(), m_objectStore);
double agOwnershipResetTime = timer.secs(cta::utils::Timer::reset_t::resetCounter);
log::ScopedParamContainer params(logContext);
params.add("vid", bestVid)
params.add("tapeVid", bestVid)
.add("queueObject", owner)
.add("jobObject", rReq->getAddressIfSet())
.add("fileId", rReq->getArchiveFile().archiveFileID)
......@@ -2190,13 +2190,13 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
try {
re.removeRetrieveQueueAndCommit(mountInfo.vid, QueueType::LiveJobs, logContext);
log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid)
params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet());
logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): de-referenced missing queue from root entry");
} catch (RootEntry::ArchiveQueueNotEmpty & ex) {
// TODO: improve: if we fail here we could retry to fetch a job.
log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid)
params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet())
.add("Message", ex.getMessageValue());
logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): could not de-referenced missing queue from root entry");
......@@ -2209,7 +2209,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
auto queueSummaryBefore = rq.getJobsSummary();
{
log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid)
params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet())
.add("queueSize", rq.getJobsSummary().files);
logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): retrieve queue found.");
......@@ -2229,7 +2229,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
}
{
log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid)
params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet())
.add("candidatesCount", candidateJobs.size())
.add("currentFiles", currentFiles)
......@@ -2270,7 +2270,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
(*j)->m_jobOwned = true;
(*j)->m_mountId = mountInfo.mountId;
log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid)
params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet())
.add("requestObject", (*j)->m_retrieveRequest.getAddressIfSet())
.add("fileId", (*j)->archiveFile.archiveFileID);
......@@ -2285,7 +2285,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
jobsToDequeue.emplace_back((*j)->m_retrieveRequest.getAddressIfSet());
// Log the event.
log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid)
params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet())
.add("requestObject", (*j)->m_retrieveRequest.getAddressIfSet());
logContext.log(log::WARNING, "In RetrieveMount::getNextJobBatch(): skipped job not owned or not present.");
......@@ -2296,7 +2296,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
log::ScopedParamContainer params(logContext);
int demangleStatus;
char * exceptionTypeStr = abi::__cxa_demangle(typeid(e).name(), nullptr, nullptr, &demangleStatus);
params.add("vid", mountInfo.vid)
params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet())
.add("requestObject", (*j)->m_retrieveRequest.getAddressIfSet());
if (!demangleStatus) {
......@@ -2315,7 +2315,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
log::ScopedParamContainer params(logContext);
int demangleStatus;
char * exceptionTypeStr = abi::__cxa_demangle(typeid(e).name(), nullptr, nullptr, &demangleStatus);
params.add("vid", mountInfo.vid)
params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet())
.add("requestObject", (*j)->m_retrieveRequest.getAddressIfSet());
if (!demangleStatus) {
......@@ -2365,12 +2365,12 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
re.fetch();
re.removeRetrieveQueueAndCommit(mountInfo.vid, QueueType::LiveJobs, logContext);
log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid)
params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet());
logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): deleted empty queue");
} catch (cta::exception::Exception &ex) {
log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid)
params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet())
.add("Message", ex.getMessageValue());
logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): could not delete a presumably empty queue");
......@@ -2380,7 +2380,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
// We can now summarize this round
{
log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid)
params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet())
.add("filesAdded", currentFiles - beforeFiles)
.add("bytesAdded", currentBytes - beforeBytes)
......
......@@ -564,7 +564,7 @@ void Scheduler::sortAndGetTapesForMountInfo(std::unique_ptr<SchedulerDatabase::T
if (em.vid.size()) {
tapesInUse.insert(em.vid);
log::ScopedParamContainer params(lc);
params.add("vid", em.vid)
params.add("tapeVid", em.vid)
.add("mountType", common::dataStructures::toString(em.type))
.add("drive", em.driveName);
lc.log(log::DEBUG,"In Scheduler::sortAndGetTapesForMountInfo(): tapeAlreadyInUse found.");
......@@ -598,7 +598,7 @@ void Scheduler::sortAndGetTapesForMountInfo(std::unique_ptr<SchedulerDatabase::T
log::ScopedParamContainer params(lc);
params.add("tapepool", m->tapePool);
if ( m->type == common::dataStructures::MountType::Retrieve) {
params.add("VID", m->vid);
params.add("tapeVid", m->vid);
}
params.add("mountType", common::dataStructures::toString(m->type))
.add("existingMounts", existingMounts)
......@@ -618,7 +618,7 @@ void Scheduler::sortAndGetTapesForMountInfo(std::unique_ptr<SchedulerDatabase::T
log::ScopedParamContainer params(lc);
params.add("tapepool", m->tapePool);
if ( m->type == common::dataStructures::MountType::Retrieve) {
params.add("VID", m->vid);
params.add("tapeVid", m->vid);
}
params.add("mountType", common::dataStructures::toString(m->type))
.add("existingMounts", existingMounts)
......@@ -709,7 +709,7 @@ bool Scheduler::getNextMountDryRun(const std::string& logicalLibraryName, const
} catch (...) {}
log::ScopedParamContainer params(lc);
params.add("tapepool", m->tapePool)
.add("vid", t.vid)
.add("tapeVid", t.vid)
.add("mountType", common::dataStructures::toString(m->type))
.add("existingMounts", existingMounts)
.add("bytesQueued", m->bytesQueued)
......@@ -743,7 +743,7 @@ bool Scheduler::getNextMountDryRun(const std::string& logicalLibraryName, const
schedulerDbTime = getMountInfoTime;
catalogueTime = getTapeInfoTime + getTapeForWriteTime;
params.add("tapepool", m->tapePool)
.add("vid", m->vid)
.add("tapeVid", m->vid)
.add("mountType", common::dataStructures::toString(m->type))
.add("existingMounts", existingMounts)
.add("bytesQueued", m->bytesQueued)
......@@ -861,7 +861,7 @@ std::unique_ptr<TapeMount> Scheduler::getNextMount(const std::string &logicalLib
catalogueTime = getTapeInfoTime + getTapeForWriteTime;
params.add("tapepool", m->tapePool)
.add("vid", t.vid)
.add("tapeVid", t.vid)
.add("vo",t.vo)
.add("mediaType",t.mediaType)
.add("vendor",t.vendor)
......@@ -926,7 +926,7 @@ std::unique_ptr<TapeMount> Scheduler::getNextMount(const std::string &logicalLib
schedulerDbTime = getMountInfoTime + queueTrimingTime + mountCreationTime + driveStatusSetTime;
catalogueTime = getTapeInfoTime + getTapeForWriteTime;
params.add("tapepool", m->tapePool)
.add("vid", m->vid)
.add("tapeVid", m->vid)
.add("vo",m->vo)
.add("mediaType",m->mediaType)
.add("vendor",m->vendor)
......
......@@ -65,8 +65,8 @@ castor::tape::tapeserver::daemon::Session::EndOfSessionAction
// Reaching this point means the cleaner failed and an exception was thrown
std::list<cta::log::Param> params = {
cta::log::Param("TPVID", m_vid),
cta::log::Param("unitName", m_driveConfig.unitName),
cta::log::Param("tapeVid", m_vid),
cta::log::Param("tapeDrive", m_driveConfig.unitName),
cta::log::Param("message", errorMessage)};
m_log(cta::log::ERR, "Cleaner failed", params);
return MARK_DRIVE_AS_DOWN;
......@@ -104,8 +104,8 @@ void castor::tape::tapeserver::daemon::CleanerSession::cleanDrive(drive::DriveIn
if(!drive.hasTapeInPlace()) {
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("TPVID", m_vid));
params.push_back(cta::log::Param("unitName", m_driveConfig.unitName));
params.push_back(cta::log::Param("tapeVid", m_vid));
params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName));
m_log(cta::log::INFO, "Cleaner found tape drive empty", params);
return; //return immediately if there is no tape
}
......@@ -155,8 +155,8 @@ void castor::tape::tapeserver::daemon::CleanerSession::logAndClearTapeAlerts(dri
// Reaching this point means it failed and an exception was thrown (because of the "return" above)
std::list<cta::log::Param> params = {
cta::log::Param("TPVID", m_vid),
cta::log::Param("unitName", m_driveConfig.unitName),
cta::log::Param("tapeVid", m_vid),
cta::log::Param("tapeDrive", m_driveConfig.unitName),
cta::log::Param("message", errorMessage)};
m_log(cta::log::ERR, "Cleaner failed getting tape alerts from the drive", params);
}
......@@ -202,8 +202,8 @@ std::unique_ptr<castor::tape::tapeserver::drive::DriveInterface>
void castor::tape::tapeserver::daemon::CleanerSession::waitUntilMediaIsReady(
drive::DriveInterface &drive) {
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("TPVID", m_vid));
params.push_back(cta::log::Param("unitName", m_driveConfig.unitName));
params.push_back(cta::log::Param("tapeVid", m_vid));
params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName));
params.push_back(cta::log::Param("waitMediaInDriveTimeout",
m_waitMediaInDriveTimeout));
......@@ -224,8 +224,8 @@ void castor::tape::tapeserver::daemon::CleanerSession::waitUntilMediaIsReady(
void castor::tape::tapeserver::daemon::CleanerSession::rewindDrive(
drive::DriveInterface &drive) {
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("TPVID", m_vid));
params.push_back(cta::log::Param("unitName", m_driveConfig.unitName));
params.push_back(cta::log::Param("tapeVid", m_vid));
params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName));
m_log(cta::log::INFO, "Cleaner rewinding tape", params);
drive.rewind();
......@@ -238,8 +238,8 @@ void castor::tape::tapeserver::daemon::CleanerSession::rewindDrive(
void castor::tape::tapeserver::daemon::CleanerSession::checkTapeContainsData(
drive::DriveInterface &drive) {
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("TPVID", m_vid));
params.push_back(cta::log::Param("unitName", m_driveConfig.unitName));
params.push_back(cta::log::Param("tapeVid", m_vid));
params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName));
m_log(cta::log::INFO, "Cleaner checking tape contains data", params);
if(drive.isTapeBlank()) {
......@@ -257,8 +257,8 @@ std::string castor::tape::tapeserver::daemon::CleanerSession::checkVolumeLabel(
drive::DriveInterface &drive) {
tapeFile::VOL1 vol1;
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("TPVID", m_vid));
params.push_back(cta::log::Param("unitName", m_driveConfig.unitName));
params.push_back(cta::log::Param("tapeVid", m_vid));
params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName));
try {
drive.readExactBlock((void * )&vol1, sizeof(vol1),
......@@ -296,8 +296,8 @@ void castor::tape::tapeserver::daemon::CleanerSession::unloadTape(
const std::string &vid, drive::DriveInterface &drive) {
const cta::mediachanger::LibrarySlot &librarySlot = m_driveConfig.librarySlot();
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("TPVID", vid));
params.push_back(cta::log::Param("unitName", m_driveConfig.unitName));
params.push_back(cta::log::Param("tapeVid", vid));
params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName));
params.push_back(cta::log::Param("librarySlot", librarySlot.str()));
// We implement the same policy as with the tape sessions:
......@@ -327,8 +327,8 @@ void castor::tape::tapeserver::daemon::CleanerSession::dismountTape(
const std::string &vid) {
const cta::mediachanger::LibrarySlot &librarySlot = m_driveConfig.librarySlot();
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("TPVID", vid));
params.push_back(cta::log::Param("unitName", m_driveConfig.unitName));
params.push_back(cta::log::Param("tapeVid", vid));
params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName));
params.push_back(cta::log::Param("librarySlot", librarySlot.str()));
try {
......
......@@ -53,7 +53,7 @@ bool castor::tape::tapeserver::daemon::EmptyDriveProbe::driveIsEmpty() throw() {
// Reaching this point means the probe failed and an exception was thrown
std::list<cta::log::Param> params = {
cta::log::Param("unitName", m_driveConfig.unitName),
cta::log::Param("tapeDrive", m_driveConfig.unitName),
cta::log::Param("message", errorMessage)};
m_log(cta::log::ERR, "Probe failed", params);
return false;
......@@ -65,7 +65,7 @@ bool castor::tape::tapeserver::daemon::EmptyDriveProbe::driveIsEmpty() throw() {
bool castor::tape::tapeserver::daemon::EmptyDriveProbe::
exceptionThrowingDriveIsEmpty() {
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("unitName", m_driveConfig.unitName));
params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName));
std::unique_ptr<drive::DriveInterface> drivePtr = createDrive();
drive::DriveInterface &drive = *drivePtr.get();
......
......@@ -82,8 +82,8 @@ castor::tape::tapeserver::daemon::Session::EndOfSessionAction
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("uid", m_request.uid));
params.push_back(cta::log::Param("gid", m_request.gid));
params.push_back(cta::log::Param("TPVID", m_request.vid));
params.push_back(cta::log::Param("unitName", m_request.drive));
params.push_back(cta::log::Param("tapeVid", m_request.vid));
params.push_back(cta::log::Param("tapeDrive", m_request.drive));
params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary));
params.push_back(cta::log::Param("force", boolToStr(m_force)));
params.push_back(cta::log::Param("lbp", boolToStr(m_lbp)));
......@@ -111,8 +111,8 @@ castor::tape::tapeserver::daemon::Session::EndOfSessionAction
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("uid", m_request.uid));
params.push_back(cta::log::Param("gid", m_request.gid));
params.push_back(cta::log::Param("TPVID", m_request.vid));
params.push_back(cta::log::Param("unitName", m_request.drive));
params.push_back(cta::log::Param("tapeVid", m_request.vid));
params.push_back(cta::log::Param("tapeDrive", m_request.drive));
params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary));
params.push_back(cta::log::Param("force", boolToStr(m_force)));
params.push_back(cta::log::Param("lbp", boolToStr(m_lbp)));
......@@ -174,8 +174,8 @@ void castor::tape::tapeserver::daemon::LabelSession::setProcessCapabilities(
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("uid", m_request.uid));
params.push_back(cta::log::Param("gid", m_request.gid));
params.push_back(cta::log::Param("TPVID", m_request.vid));
params.push_back(cta::log::Param("unitName", m_request.drive));
params.push_back(cta::log::Param("tapeVid", m_request.vid));
params.push_back(cta::log::Param("tapeDrive", m_request.drive));
params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary));
params.push_back(cta::log::Param("force", boolToStr(m_force)));
params.push_back(cta::log::Param("lbp", boolToStr(m_lbp)));
......@@ -215,8 +215,8 @@ void castor::tape::tapeserver::daemon::LabelSession::mountTape() {
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("uid", m_request.uid));
params.push_back(cta::log::Param("gid", m_request.gid));
params.push_back(cta::log::Param("TPVID", m_request.vid));
params.push_back(cta::log::Param("unitName", m_request.drive));
params.push_back(cta::log::Param("tapeVid", m_request.vid));
params.push_back(cta::log::Param("tapeDrive", m_request.drive));
params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary));
params.push_back(cta::log::Param("force", boolToStr(m_force)));
params.push_back(cta::log::Param("lbp", boolToStr(m_lbp)));
......@@ -240,8 +240,8 @@ void castor::tape::tapeserver::daemon::LabelSession::waitUntilTapeLoaded(
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("uid", m_request.uid));
params.push_back(cta::log::Param("gid", m_request.gid));
params.push_back(cta::log::Param("TPVID", m_request.vid));
params.push_back(cta::log::Param("unitName", m_request.drive));
params.push_back(cta::log::Param("tapeVid", m_request.vid));
params.push_back(cta::log::Param("tapeDrive", m_request.drive));
params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary));
params.push_back(cta::log::Param("force", boolToStr(m_force)));
params.push_back(cta::log::Param("lbp", boolToStr(m_lbp)));
......@@ -265,8 +265,8 @@ void castor::tape::tapeserver::daemon::LabelSession::rewindDrive(
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("uid", m_request.uid));
params.push_back(cta::log::Param("gid", m_request.gid));
params.push_back(cta::log::Param("TPVID", m_request.vid));
params.push_back(cta::log::Param("unitName", m_request.drive));
params.push_back(cta::log::Param("tapeVid", m_request.vid));
params.push_back(cta::log::Param("tapeDrive", m_request.drive));
params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary));
params.push_back(cta::log::Param("force", boolToStr(m_force)));
params.push_back(cta::log::Param("lbp", boolToStr(m_lbp)));
......@@ -284,8 +284,8 @@ void castor::tape::tapeserver::daemon::LabelSession::
std::list<cta::log::Param> params;
params.push_back(cta::log::Param("uid", m_request.uid));
params.push_back(cta::log::Param("gid", m_request.gid));
params.push_back(cta::log::Param("TPVID", m_request.vid));
params.push_back(cta::log::Param("unitName", m_request.drive));