Log And List Files

Action ID: debug:log
NPM Package:

@backstage/plugin-scaffolder-backend

Description

Writes a message into the log and/or lists all files in the workspace.

Input Schema

PropertyTypeDescriptionRequired
messagestringMessage to output.
listWorkspaceanyList all files in the workspace. If used with "with-contents", also the file contents are listed.

Output Schema

No output schema defined for this action.

Usage Examples

Log a summary and list generated files

Use this after fetch:template to confirm what was created. It writes a short message and lists all files in the workspace so you can quickly verify the structure.

Copy
steps:
  - id: fetch-base
    action: fetch:template
    input:
      url: ./skeleton
      targetPath: .
      values:
        component_id: ${{ parameters.component_id }}
        owner: ${{ parameters.owner }}

  - id: debug-summary
    action: debug:log
    input:
      message: "Generated service ${{ parameters.component_id }} for owner ${{ parameters.owner }}"
      listWorkspace: true

Inspect workspace with file contents for debugging

Use this when a template produces unexpected output. It prints a message and lists all files with their contents to help diagnose templating issues.

Copy
steps:
  - id: fetch-app
    action: fetch:template
    input:
      url: ./templates/node-service
      targetPath: .
      values:
        component_id: ${{ parameters.component_id }}
        owner: ${{ parameters.owner }}
        description: "Node.js service scaffolded by Backstage"

  - id: debug-with-contents
    action: debug:log
    input:
      message: "Inspecting workspace contents for ${{ parameters.component_id }}"
      listWorkspace: "with-contents"

Other actions in @backstage/plugin-scaffolder-backend