Uploaded image for project: 'Magnolia Groovy Module'
  1. Magnolia Groovy Module
  2. MGNLGROOVY-48

Less obtrusive toString() implementation

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 2.2
    • None
    • integration
    • None

      The current re-implementation of the toString() method outputs a node's properties and subnodes. While this can be useful in the console, it can get pretty verbose and unreadable in logs, when using components whose log statements have been written naively relying on the default toString() implementation of nodes/content. (ie log.info("lalala {} lala", someNode"))

      It'd be neat if there was a way to only apply this toString implementation in the context of the console.

      I'd argue however that removing altogether might also be an option; the code doing this output could be moved to a class such as the existing DumpUtil which provide similar functionality. (and as such, in a console, you'd do DumpUtil.dump(myNode) instead of myNode. (and/or we could add support for keywords like cat or ls...)

        Acceptance criteria

              fgrilli Federico Grilli
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD