Skip to content

Add typed JSON output to app logs sources - #8574

Merged
gonzaloriestra merged 4 commits into
mainfrom
gonzalo/json-app-logs-sources
Sep 21, 2026
Merged

gonzaloriestra merged 4 commits into
mainfrom
gonzalo/json-app-logs-sources

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Related to https://github.com/shop/issues-develop/issues/23670.

app logs sources has no machine-readable output or discoverable result schema.

WHAT is this pull request doing?

Add --json with typed source records containing the filter string, extension identity, configuration, paths and capabilities already available locally. Keep namespace sections in text output and preserve invalid-app exit behavior.

Expose the schema in help and refresh generated documentation. Each record's source is the value accepted by app logs --source.

Output example: text vs JSON

Illustrative app with one function extension. JSON is an excerpt; additional metadata fields are omitted.

Textshopify app logs sources --path /path/to/app

EXTENSIONS
extensions.cart-discount

JSONshopify app logs sources --path /path/to/app --json

[
  {
    "source": "extensions.cart-discount",
    "namespace": "extensions",
    "handle": "cart-discount",
    "name": "Cart discount",
    "type": "function",
    "directory": "/path/to/app/extensions/cart-discount",
    "configurationPath": "/path/to/app/extensions/cart-discount/shopify.extension.toml",
    "entrySourceFilePath": "/path/to/app/extensions/cart-discount/src/index.js",
    "outputPath": "/path/to/app/extensions/cart-discount/dist/index.wasm"
  }
]

The source value can be passed directly to shopify app logs --source extensions.cart-discount.

How to manually test your changes?

pnpm shopify app logs sources --path /path/to/app
pnpm shopify app logs sources --path /path/to/app --json
pnpm shopify app logs sources --json-schema

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact

@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Sep 17, 2026
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-app-logs-sources branch from 010e5f7 to 1d929e8 Compare September 17, 2026 15:04
@github-actions github-actions Bot added no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. and removed Area: @shopify/cli @shopify/cli package issues labels Sep 18, 2026
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-app-logs-sources branch from ab72011 to 9cadf0b Compare September 18, 2026 12:24
@gonzaloriestra
gonzaloriestra marked this pull request as ready for review September 21, 2026 09:09
@gonzaloriestra
gonzaloriestra requested review from a team as code owners September 21, 2026 09:09
@gonzaloriestra
gonzaloriestra added this pull request to the merge queue Sep 21, 2026
Merged via the queue into main with commit cbb5184 Sep 21, 2026
30 checks passed
@gonzaloriestra
gonzaloriestra deleted the gonzalo/json-app-logs-sources branch September 21, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants