From 0c89a8620ee3c86e463766d05a60c3c29474216c Mon Sep 17 00:00:00 2001
From: Julien Leduc <julien.leduc@cern.ch>
Date: Fri, 15 Nov 2019 12:06:38 +0100
Subject: [PATCH] Changing all exception_message to exceptionMessage

---
 .../tape/tapeserver/daemon/TapeReadSingleThread.cpp    | 10 +++++-----
 .../tapeserver/daemon/TapeSingleThreadInterface.hpp    |  6 +++---
 .../tape/tapeserver/daemon/TapeWriteSingleThread.cpp   |  8 ++++----
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/tapeserver/castor/tape/tapeserver/daemon/TapeReadSingleThread.cpp b/tapeserver/castor/tape/tapeserver/daemon/TapeReadSingleThread.cpp
index dd8fc7bfe3..439a856f49 100644
--- a/tapeserver/castor/tape/tapeserver/daemon/TapeReadSingleThread.cpp
+++ b/tapeserver/castor/tape/tapeserver/daemon/TapeReadSingleThread.cpp
@@ -126,7 +126,7 @@ castor::tape::tapeserver::daemon::TapeReadSingleThread::TapeCleaning::~TapeClean
     m_this.m_hardwareStatus = Session::MARK_DRIVE_AS_DOWN;
     m_this.m_rrp.reportDriveStatus(cta::common::dataStructures::DriveStatus::Down);
     cta::log::ScopedParamContainer scoped(m_this.m_logContext);
-    scoped.add("exception_message", ex.getMessageValue());
+    scoped.add("exceptionMessage", ex.getMessageValue());
     m_this.m_logContext.log(cta::log::ERR, "Exception in TapeReadSingleThread-TapeCleaning when unmounting the tape. Putting the drive down.");
     try {
       if (currentErrorToCount.size()) {
@@ -182,7 +182,7 @@ castor::tape::tapeserver::daemon::TapeReadSingleThread::openReadSession() {
     return rs;
   }catch(cta::exception::Exception & ex){
       cta::log::ScopedParamContainer scoped(m_logContext); 
-      scoped.add("exception_message", ex.getMessageValue());
+      scoped.add("exceptionMessage", ex.getMessageValue());
       m_logContext.log(cta::log::ERR, "Failed to tapeFile::ReadSession");
       throw cta::exception::Exception("Tape's label is either missing or not valid"); 
   }  
@@ -433,7 +433,7 @@ void castor::tape::tapeserver::daemon::TapeReadSingleThread::logSCSIMetrics() {
   }
   catch (const cta::exception::Exception &ex) {
     cta::log::ScopedParamContainer scoped(m_logContext);
-    scoped.add("exception_message", ex.getMessageValue());
+    scoped.add("exceptionMessage", ex.getMessageValue());
     m_logContext.log(cta::log::ERR, "Exception in logging mount general statistics");
   }
 
@@ -451,7 +451,7 @@ void castor::tape::tapeserver::daemon::TapeReadSingleThread::logSCSIMetrics() {
   }
   catch (const cta::exception::Exception &ex) {
     cta::log::ScopedParamContainer scoped(m_logContext);
-    scoped.add("exception_message", ex.getMessageValue());
+    scoped.add("exceptionMessage", ex.getMessageValue());
     m_logContext.log(cta::log::ERR, "Exception in logging drive statistics");
   }
 
@@ -465,7 +465,7 @@ void castor::tape::tapeserver::daemon::TapeReadSingleThread::logSCSIMetrics() {
   }
   catch (const cta::exception::Exception &ex) {
     cta::log::ScopedParamContainer scoped(m_logContext);
-    scoped.add("exception_message", ex.getMessageValue());
+    scoped.add("exceptionMessage", ex.getMessageValue());
     m_logContext.log(cta::log::ERR, "Exception in logging volume statistics");
   }
 }
diff --git a/tapeserver/castor/tape/tapeserver/daemon/TapeSingleThreadInterface.hpp b/tapeserver/castor/tape/tapeserver/daemon/TapeSingleThreadInterface.hpp
index 7ccc635b1f..1c796c86d2 100644
--- a/tapeserver/castor/tape/tapeserver/daemon/TapeSingleThreadInterface.hpp
+++ b/tapeserver/castor/tape/tapeserver/daemon/TapeSingleThreadInterface.hpp
@@ -112,7 +112,7 @@ protected:
         }
     }
     catch (cta::exception::Exception & ex) {
-      scoped.add("exception_message", ex.getMessageValue());
+      scoped.add("exceptionMessage", ex.getMessageValue());
       m_logContext.log(cta::log::ERR,
         "Failed to mount the tape for read-only access");
       throw;
@@ -133,7 +133,7 @@ protected:
         m_logContext.log(cta::log::INFO, "Tape mounted for read/write access");
     }
     catch (cta::exception::Exception & ex) {
-      scoped.add("exception_message", ex.getMessageValue());
+      scoped.add("exceptionMessage", ex.getMessageValue());
       m_logContext.log(cta::log::ERR,
         "Failed to mount the tape for read/write access");
       throw;
@@ -154,7 +154,7 @@ protected:
       m_drive.waitUntilReady(60);
       cta::log::LogContext::ScopedParam sp0(m_logContext, cta::log::Param("loadTime", timer.secs()));
     }catch(const cta::exception::Exception& e){
-      cta::log::LogContext::ScopedParam sp01(m_logContext, cta::log::Param("exception_message", e.getMessageValue()));
+      cta::log::LogContext::ScopedParam sp01(m_logContext, cta::log::Param("exceptionMessage", e.getMessageValue()));
       m_logContext.log(cta::log::INFO, "Got timeout or error while waiting for drive to be ready.");
       throw;
     }
diff --git a/tapeserver/castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp b/tapeserver/castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp
index d76ec118eb..2985fd972c 100644
--- a/tapeserver/castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp
+++ b/tapeserver/castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp
@@ -119,7 +119,7 @@ castor::tape::tapeserver::daemon::TapeWriteSingleThread::TapeCleaning::~TapeClea
     m_this.m_hardwareStatus = Session::MARK_DRIVE_AS_DOWN;
     m_this.m_reportPacker.reportDriveStatus(cta::common::dataStructures::DriveStatus::Down, m_this.m_logContext);
     cta::log::ScopedParamContainer scoped(m_this.m_logContext);
-    scoped.add("exception_message", ex.getMessageValue());
+    scoped.add("exceptionMessage", ex.getMessageValue());
     m_this.m_logContext.log(cta::log::ERR, "Exception in TapeWriteSingleThread-TapeCleaning. Putting the drive down.");
     // As we do not throw exceptions from here, the watchdog signalling has
     // to occur from here.
@@ -568,7 +568,7 @@ void castor::tape::tapeserver::daemon::TapeWriteSingleThread::logSCSIMetrics() {
   }
   catch (const cta::exception::Exception &ex) {
     cta::log::ScopedParamContainer scoped(m_logContext);
-    scoped.add("exception_message", ex.getMessageValue());
+    scoped.add("exceptionMessage", ex.getMessageValue());
     m_logContext.log(cta::log::ERR, "Exception in logging mount general statistics");
   }
 
@@ -586,7 +586,7 @@ void castor::tape::tapeserver::daemon::TapeWriteSingleThread::logSCSIMetrics() {
   }
   catch (const cta::exception::Exception &ex) {
     cta::log::ScopedParamContainer scoped(m_logContext);
-    scoped.add("exception_message", ex.getMessageValue());
+    scoped.add("exceptionMessage", ex.getMessageValue());
     m_logContext.log(cta::log::ERR, "Exception in logging drive statistics");
   }
 
@@ -600,7 +600,7 @@ void castor::tape::tapeserver::daemon::TapeWriteSingleThread::logSCSIMetrics() {
   }
   catch (const cta::exception::Exception &ex) {
     cta::log::ScopedParamContainer scoped(m_logContext);
-    scoped.add("exception_message", ex.getMessageValue());
+    scoped.add("exceptionMessage", ex.getMessageValue());
     m_logContext.log(cta::log::ERR, "Exception in logging volume statistics");
   }
 }
-- 
GitLab