You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2021/07/06 12:36:15 UTC

[isis] 10/11: ISIS-2789: enhances CommandLogger, dump out XML as well.

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch ISIS-2789
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 7995ac7e31a2caeca0f51f2af0b9925c31bc2c4e
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Jul 6 13:35:01 2021 +0100

    ISIS-2789: enhances CommandLogger, dump out XML as well.
---
 .../applib/services/publishing/log/CommandLogger.java    | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/publishing/log/CommandLogger.java b/api/applib/src/main/java/org/apache/isis/applib/services/publishing/log/CommandLogger.java
index 6f51be8..ca78e9e 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/publishing/log/CommandLogger.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/publishing/log/CommandLogger.java
@@ -27,11 +27,13 @@ import org.springframework.stereotype.Service;
 import org.apache.isis.applib.annotation.PriorityPrecedence;
 import org.apache.isis.applib.services.command.Command;
 import org.apache.isis.applib.services.publishing.spi.CommandSubscriber;
+import org.apache.isis.applib.util.schema.CommandDtoUtils;
 
 import lombok.extern.log4j.Log4j2;
+import lombok.val;
 
 /**
- * 
+ *
  * @since 2.0 {@index}
  */
 @Service
@@ -48,11 +50,15 @@ public class CommandLogger implements CommandSubscriber {
 
     @Override
     public void onCompleted(Command command) {
-        
-        log.debug("completed: {}, systemStateChanged {}",
+
+        val commandDto = command.getCommandDto();
+        val xml = CommandDtoUtils.toXml(commandDto);
+
+        log.debug("completed: {}, systemStateChanged {} \n{}",
                 command.getLogicalMemberIdentifier(),
-                command.isSystemStateChanged());
-        
+                command.isSystemStateChanged(),
+                xml);
+
         //log.debug("completed: {}", command);
     }