Skip to content

Support structured tracing of introduced modifications after transforming session finishes #49

@Vladislav0Art

Description

Description

Right now, the plugin only emits logs into stdout and idea.log file. There is no structured information of the changes made. When scaled over complex projects, the logs are hard to read.

The idea is to output structured information about modifications each transformation applies into a JSON or YAML file, so that the resulting file is parsable (similar to how a memory file is updated by modifications a transformation introduced).

For example, every transformation may operate in its own "output block" where it mentions which file is modified (e.g., an example in a JSON format):

{
 "project": "my-project-name",
 "transformations": [
    {
       "transformation": "rename-class-transformation",
       "changes": [
           {
                "file": "path/to/java/File.java",
                "modifications": [
                      {
                         "position": { "line": 123, "offset": 23 } 
                         "payload": {
                              "initialName": "MyClass",
                              "newName": "MyModifiedClass",
                              // etc.
                         }
                     }
                 ]
           }
       ]
  }
]
}

Overall, the idea is similar to how the plugin operates with the memory file; however, the purpose is to have a structured logging artifact along with plain .log-files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions