From 118d2cb23ffe582f995ff27b005dc27c82ecf3ae Mon Sep 17 00:00:00 2001
From: Michael Davis <michael.davis@cern.ch>
Date: Wed, 21 Mar 2018 14:45:03 +0100
Subject: [PATCH] [cta-frontend] Logs long version of admin commands

---
 xroot_plugins/XrdSsiCtaRequestMessage.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xroot_plugins/XrdSsiCtaRequestMessage.cpp b/xroot_plugins/XrdSsiCtaRequestMessage.cpp
index 207758b28f..d85d9a8f8a 100644
--- a/xroot_plugins/XrdSsiCtaRequestMessage.cpp
+++ b/xroot_plugins/XrdSsiCtaRequestMessage.cpp
@@ -567,11 +567,12 @@ void RequestMessage::logAdminCmd(const std::string &function, const cta::admin::
 {
    using namespace cta::admin;
 
-   std::string log_msg = "In RequestMessage::" + function + "(): Admin command \"";
+   std::string log_msg = "In RequestMessage::" + function + "(): Admin command succeeded: ";
 
    // Reverse lookup of strings corresponding to <command,subcommand> pair
    for(auto cmd_it = cmdLookup.begin(); cmd_it != cmdLookup.end(); ++cmd_it) {
-      if(admincmd.cmd() == cmd_it->second) {
+      // Return the matching long string (length > 3)
+      if(admincmd.cmd() == cmd_it->second && cmd_it->first.length() > 3) {
          log_msg += cmd_it->first + ' ';
          break;
       }
@@ -582,7 +583,6 @@ void RequestMessage::logAdminCmd(const std::string &function, const cta::admin::
          break;
       }
    }
-   log_msg += ": success.";
 
    // Add the log message
    cta::log::ScopedParamContainer params(m_lc);
-- 
GitLab