瀏覽代碼

Merge pull request #10398 from rpastrana/HPCC-18147-DESDLJournal

HPCC-18147 Report all ESDL Binding/Definition change requests

Reviewed-By: Kevin Wang <kevin.wang@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 7 年之前
父節點
當前提交
200a260780
共有 1 個文件被更改,包括 14 次插入2 次删除
  1. 14 2
      esp/services/ws_esdlconfig/ws_esdlconfigservice.cpp

+ 14 - 2
esp/services/ws_esdlconfig/ws_esdlconfigservice.cpp

@@ -514,6 +514,7 @@ bool CWsESDLConfigEx::onPublishESDLDefinition(IEspContext &context, IEspPublishE
         }
 
         msg.appendf("Successfully published %s", newqueryid.str());
+        ESPLOG(LogMin, "ESDL Definition '%s' published by user='%s'", newqueryid.str(), (user && *user) ? user : "Anonymous");
 
         double ver = context.getClientVersion();
         if (ver >= 1.2)
@@ -728,6 +729,8 @@ int CWsESDLConfigEx::publishESDLBinding(const char * bindingName,
     conn->commit();
     conn->close(false);
     message.setf("Successfully configured Service '%s', associated with ESDL definition '%s', on ESP '%s' and binding '%s'", esdlServiceName, newId.str(), espProcName, bindingName);
+
+    ESPLOG(LogMin, "ESDL Binding '%s' published by user='%s' overwrite flag: %s", newId.str(), (user && *user) ? user : "Anonymous", overwrite ? "TRUE" : "FALSE");
     return 0;
 }
 
@@ -874,6 +877,7 @@ bool CWsESDLConfigEx::onPublishESDLBinding(IEspContext &context, IEspPublishESDL
                                                            username.str()
                                                            ));
 
+
             if (ver >= 1.2)
             {
                 if (req.getEchoBinding())
@@ -1216,6 +1220,8 @@ bool CWsESDLConfigEx::onConfigureESDLBindingMethod(IEspContext &context, IEspCon
                     {
                         double ver = context.getClientVersion();
 
+                        ESPLOG(LogMin, "ESDL Binding '%s.%d' configured method '%s' by user='%s' overwrite flag: %s", esdlDefinitionName.str(), esdlver, username.isEmpty() ? "Anonymous" : username.str(), methodName, override ? "TRUE" : "FALSE");
+
                         if (ver >= 1.2)
                         {
                             StringBuffer msg;
@@ -1640,7 +1646,10 @@ bool CWsESDLConfigEx::onDeleteESDLDefinition(IEspContext &context, IEspDeleteESD
     {
         StringBuffer thexml;
         toXML(oldEnvironment.get(), thexml,0,0);
-        fprintf(stderr, "DELETING: \n%s\n", thexml.str());
+
+        StringBuffer username;
+        context.getUserID(username);
+        ESPLOG(LogMin, "ESDL Definition '%s' Deleted by user='%s'", esdlDefinitionId.str(), username.isEmpty() ? "Anonymous" : username.str());
         resp.setDeletedTree(thexml.str());
         resp.updateStatus().setCode(0);
         resp.updateStatus().setDescription("Deleted ESDL Definition");
@@ -1690,7 +1699,10 @@ bool CWsESDLConfigEx::onDeleteESDLBinding(IEspContext &context, IEspDeleteESDLBi
     {
         StringBuffer thexml;
         toXML(oldEnvironment.get(), thexml,0,0);
-        fprintf(stderr, "DELETING: \n%s\n", thexml.str());
+        StringBuffer username;
+        context.getUserID(username);
+        ESPLOG(LogMin, "ESDL Definition '%s' Deleted by user='%s'", espBindingId.str(), username.isEmpty() ? "Anonymous" : username.str());
+
         resp.setDeletedTree(thexml.str());
         resp.updateStatus().setCode(0);
         root->removeTree(oldEnvironment);