Spring Roo
  1. Spring Roo
  2. ROO-274

Log input and output to Roo (ie script recording)

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0.RC4
    • Component/s: @ ROO SHELL
    • Labels:
      None
    • Environment:
      Any

      Description

      It would be useful if Roo were to automatically log all commands issued in a project and all the output from Roo in response to each command. Two uses:

      1. Debugging - a record of all the commands issued and what Roo responded is useful for debugging both generated application and Roo itself.

      2. A record of all commands issued would be a script that could be rerun in an empty project to reproduce the current project. It is sometime easier to trash a project and start again, rerunning all the Roo commands than to unwind changes that didn't work out by hand. An ability to recreate a user's project would also help Spring support.

        Issue Links

          Activity

          Hide
          Paul Chapman added a comment -

          See also ROO-275.

          Show
          Paul Chapman added a comment - See also ROO-275 .
          Hide
          Ben Alex added a comment -

          This is now implemented in SVN revision 460.

          File "log.roo" in the current working directory is always appended to (never overwritten). It contains all well-formed commands presented to the Roo shell and an indication of whether they worked (in which case they will not be commented out) or failed (in which case the will be prefixed by "// [failed]"). This makes the resulting logs useful for command playback.

          An example session:

          // Spring Roo ENGINEERING BUILD [rev 452:459M] log opened at 2009-11-25 09:18:36
          hint
          help
          // [failed] project --topLevelPackage com. --template ROO_ADDON_SIMPLE 
          project --topLevelPackage com.foo
          persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY 
          entity --name ~.Food --testAutomatically 
          // [failed] field boolean --fieldName from
          field boolean --fieldName from --permitReservedWords 
          quit
          // Spring Roo ENGINEERING BUILD [rev 452:459M] log closed at 2009-11-25 09:19:48
          

          Note this is only available in the Roo shell. I have implemented the feature so it can be added by STS without too much difficulty, but it is presently only available in the standalone Roo shell.

          Show
          Ben Alex added a comment - This is now implemented in SVN revision 460. File "log.roo" in the current working directory is always appended to (never overwritten). It contains all well-formed commands presented to the Roo shell and an indication of whether they worked (in which case they will not be commented out) or failed (in which case the will be prefixed by "// [failed] "). This makes the resulting logs useful for command playback. An example session: // Spring Roo ENGINEERING BUILD [rev 452:459M] log opened at 2009-11-25 09:18:36 hint help // [failed] project --topLevelPackage com. --template ROO_ADDON_SIMPLE project --topLevelPackage com.foo persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY entity --name ~.Food --testAutomatically // [failed] field boolean --fieldName from field boolean --fieldName from --permitReservedWords quit // Spring Roo ENGINEERING BUILD [rev 452:459M] log closed at 2009-11-25 09:19:48 Note this is only available in the Roo shell. I have implemented the feature so it can be added by STS without too much difficulty, but it is presently only available in the standalone Roo shell.
          Hide
          Ben Alex added a comment -

          Link to Jira request for comparable functionality in SpringSource Tool Suite (STS) version of Roo shell: https://issuetracker.springsource.com/browse/STS-724

          Show
          Ben Alex added a comment - Link to Jira request for comparable functionality in SpringSource Tool Suite (STS) version of Roo shell: https://issuetracker.springsource.com/browse/STS-724

            People

            • Assignee:
              Ben Alex
              Reporter:
              Paul Chapman
            • Votes:
              7 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: