Class LogContextTree

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, ProfileAction, Aware, MessageSource, MessageSourceAware, Action

public class LogContextTree extends AbstractProfileAction
Spring Web Flow utility action for logging on DEBUG a representation of the current ProfileRequestContext.

You can contextualize the logging of the context tree either by setting setDescription(String), or more usefully by using an attribute on the specific action expression as below. This allows using just one declaration of the action bean, but parameterized differently depending on where it is placed.

 <evaluate expression="LogContextTree">
    <attribute name="contextTreeDescription" value="My Description" />
  • Field Details


      public static final String ATTRIB_DESC
      Name of Spring web flow attribute holding the description of the tree to log.
      See Also:
    • log

      private org.slf4j.Logger log
    • description

      private String description
      Contextual description to output at the start of the action.
  • Constructor Details

    • LogContextTree

      public LogContextTree()
  • Method Details

    • setDescription

      public void setDescription(@Nullable String value)
      Set the contextual description to output at the start of the action.
      value - the description value
    • doExecute

      protected void doExecute(ProfileRequestContext profileRequestContext)
      doExecute in class AbstractProfileAction
    • logContext

      private void logContext(BaseContext current, int indent)
      Recursively log the context tree.
      current - the current context to log
      indent - the amount of leading indent
    • getIndent

      private String getIndent(int indent)
      Generate the leading indent string to print.
      indent - the amount of the indent
      the leading indent string to print