From af725fc536d78b0bf65878e7dbd471e93cb54389 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Sun, 18 Nov 2007 04:38:56 +0000 Subject: [PATCH] logging improvements --- .../conversation/impl/ContainedConversation.java | 2 +- .../impl/SessionBindingConversationManager.java | 3 --- .../org/springframework/webflow/engine/Flow.java | 2 -- .../springframework/webflow/engine/ViewState.java | 13 ++++++++++++- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/spring-webflow/src/main/java/org/springframework/webflow/conversation/impl/ContainedConversation.java b/spring-webflow/src/main/java/org/springframework/webflow/conversation/impl/ContainedConversation.java index e1d31ee1..9d5cdcb1 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/conversation/impl/ContainedConversation.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/conversation/impl/ContainedConversation.java @@ -130,7 +130,7 @@ class ContainedConversation implements Conversation, Serializable { return id.hashCode(); } - // custom serialisation + // custom serialization private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); diff --git a/spring-webflow/src/main/java/org/springframework/webflow/conversation/impl/SessionBindingConversationManager.java b/spring-webflow/src/main/java/org/springframework/webflow/conversation/impl/SessionBindingConversationManager.java index dec721b2..40300201 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/conversation/impl/SessionBindingConversationManager.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/conversation/impl/SessionBindingConversationManager.java @@ -119,9 +119,6 @@ public class SessionBindingConversationManager implements ConversationManager { } public Conversation getConversation(ConversationId id) throws ConversationException { - if (logger.isDebugEnabled()) { - logger.debug("Getting conversation " + id); - } return getConversationContainer().getConversation(id); } diff --git a/spring-webflow/src/main/java/org/springframework/webflow/engine/Flow.java b/spring-webflow/src/main/java/org/springframework/webflow/engine/Flow.java index 2a7788a7..5159afc9 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/engine/Flow.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/engine/Flow.java @@ -578,7 +578,6 @@ public class Flow extends AnnotatedObject implements FlowDefinition { */ private class NoInputMapper implements AttributeMapper { public void map(Object source, Object target, MappingContext context) { - logger.debug("No input attributes mapped"); } public String toString() { @@ -592,7 +591,6 @@ public class Flow extends AnnotatedObject implements FlowDefinition { */ private class NoOutputMapper implements AttributeMapper { public void map(Object source, Object target, MappingContext context) { - logger.debug("No output attributes mapped"); } public String toString() { diff --git a/spring-webflow/src/main/java/org/springframework/webflow/engine/ViewState.java b/spring-webflow/src/main/java/org/springframework/webflow/engine/ViewState.java index e93f727e..e659f3d1 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/engine/ViewState.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/engine/ViewState.java @@ -17,6 +17,7 @@ package org.springframework.webflow.engine; import org.springframework.core.style.ToStringCreator; import org.springframework.util.Assert; +import org.springframework.webflow.execution.Event; import org.springframework.webflow.execution.FlowExecutionException; import org.springframework.webflow.execution.View; import org.springframework.webflow.execution.ViewFactory; @@ -83,6 +84,9 @@ public class ViewState extends TransitionableState { } else { View view = viewFactory.getView(context); renderActionList.execute(context); + if (logger.isDebugEnabled()) { + logger.debug("Rendering view " + view); + } view.render(); context.getMessageContext().clearMessages(); context.getFlashScope().clear(); @@ -92,9 +96,16 @@ public class ViewState extends TransitionableState { public void resume(RequestControlContext context) { View view = viewFactory.getView(context); if (view.eventSignaled()) { - context.handleEvent(view.getEvent()); + Event event = view.getEvent(); + if (logger.isDebugEnabled()) { + logger.debug("Event '" + event.getId() + "' signaled on view " + view); + } + context.handleEvent(event); } else { renderActionList.execute(context); + if (logger.isDebugEnabled()) { + logger.debug("Rendering refreshed view " + view); + } view.render(); context.getMessageContext().clearMessages(); context.getFlashScope().clear();