diff --git a/scheduler/Scheduler.cpp b/scheduler/Scheduler.cpp index 035919bb29adccbb5dcfb2f7f6b4f8845439b905..f4263436dc68613b39355e08c0e7edef12791272 100644 --- a/scheduler/Scheduler.cpp +++ b/scheduler/Scheduler.cpp @@ -349,7 +349,8 @@ common::dataStructures::DesiredDriveState Scheduler::getDesiredDriveState(const if (d.driveName == driveName) { auto schedulerDbTime = t.secs(); log::ScopedParamContainer spc(lc); - spc.add("schedulerDbTime", schedulerDbTime); + spc.add("drive", driveName) + .add("schedulerDbTime", schedulerDbTime); lc.log(log::INFO, "In Scheduler::getDesiredDriveState(): success."); return d.desiredDriveState; } @@ -360,15 +361,16 @@ common::dataStructures::DesiredDriveState Scheduler::getDesiredDriveState(const //------------------------------------------------------------------------------ // setDesiredDriveState //------------------------------------------------------------------------------ -void Scheduler::setDesiredDriveState(const common::dataStructures::SecurityIdentity &cliIdentity, const std::string &unitName, const bool up, const bool force, log::LogContext & lc) { +void Scheduler::setDesiredDriveState(const common::dataStructures::SecurityIdentity &cliIdentity, const std::string &driveName, const bool up, const bool force, log::LogContext & lc) { utils::Timer t; common::dataStructures::DesiredDriveState desiredDriveState; desiredDriveState.up = up; desiredDriveState.forceDown = force; - m_db.setDesiredDriveState(unitName, desiredDriveState); + m_db.setDesiredDriveState(driveName, desiredDriveState); auto schedulerDbTime = t.secs(); log::ScopedParamContainer spc(lc); - spc.add("up", up?"up":"down") + spc.add("drive", driveName) + .add("up", up?"up":"down") .add("force", force?"yes":"no") .add("schedulerDbTime", schedulerDbTime); lc.log(log::INFO, "In Scheduler::setDesiredDriveState(): success."); @@ -383,7 +385,8 @@ void Scheduler::reportDriveStatus(const common::dataStructures::DriveInfo& drive m_db.reportDriveStatus(driveInfo, type, status, time(NULL)); auto schedulerDbTime = t.secs(); log::ScopedParamContainer spc(lc); - spc.add("schedulerDbTime", schedulerDbTime); + spc.add("drive", driveInfo.driveName) + .add("schedulerDbTime", schedulerDbTime); lc.log(log::INFO, "In Scheduler::reportDriveStatus(): success."); } diff --git a/scheduler/Scheduler.hpp b/scheduler/Scheduler.hpp index ff7e17851511222f55d7447a0a5c1e7ce5f323a4..49a9f93ee29cce89fd462bc83feb474400cca052 100644 --- a/scheduler/Scheduler.hpp +++ b/scheduler/Scheduler.hpp @@ -209,12 +209,12 @@ public: * object store for the requested drive status. The status is reset to down by the drives * on hardware failures. * @param cliIdentity The identity of the user requesting the drive to put up of down. - * @param unitName The drive name + * @param driveName The drive name * @param up indicates whether the drive should be put up or down. * @param force indicates whether we want to force the drive to be up. */ //TODO: replace the 2 bools with a structure. void setDesiredDriveState(const cta::common::dataStructures::SecurityIdentity &cliIdentity, - const std::string &unitName, const bool up, const bool force, log::LogContext & lc); + const std::string &driveName, const bool up, const bool force, log::LogContext & lc); /** * Reports the state of the drive to the object store. This information is then reported